Interviews: attendees are joined to a bare \"with\"/\"With\" msgid and a hard-coded comma #627

Closed
opened 2026-10-01 10:48:29 +00:00 by tiagoagueda · 1 comment
Owner

Found on 2026-09-29 in a read-only review of postulo at 95348908d, reading the interview templates for sentences built from pieces.

Checked again on 2026-10-01 against main at 0a5cad587: still present.

Both places that list who an interview is with build the phrase in the template: a lone translated preposition, then names joined with a literal , . Translators get the msgids with and With with no context and no placeholder, and the separator cannot be translated at all. Related to #225, which cleared sentences assembled from fragments elsewhere but did not list these two.

  • Where: templates/applications/interview_list.html:70-73 ({% translate "with" %} before the first name, , between the rest); templates/applications/application_detail.html:284-288 ({% translate "With" %}, then names joined with , ).
  • What happens: a translator sees msgid "with" and msgid "With" with nothing saying they introduce the people at an interview, and has no way to move the names, add a particle after them, or use the language's own list separator (Arabic ،, Chinese and Japanese 、). The rendered line keeps English word order and punctuation in every language.
  • Why it matters: the interview list and the application page read unnaturally outside English, and a bare with is the kind of short msgid that later collides with another use of the same word.
  • Fix: join the names in the view, or with a small filter whose separator is translatable (with a translator comment), and render one {% blocktranslate with people=names %}with {{ people }}{% endblocktranslate %} per page, each with a context or translator comment saying it introduces the people at an interview.

Done when

  • A test in tests/test_interviews.py renders the interview list and the application page in a test locale whose catalogue translates the whole phrase and the separator, and asserts both appear; and makemessages no longer extracts a bare msgid "with".
Found on 2026-09-29 in a read-only review of postulo at 95348908d, reading the interview templates for sentences built from pieces. Checked again on 2026-10-01 against `main` at `0a5cad587`: still present. Both places that list who an interview is with build the phrase in the template: a lone translated preposition, then names joined with a literal `, `. Translators get the msgids `with` and `With` with no context and no placeholder, and the separator cannot be translated at all. Related to #225, which cleared sentences assembled from fragments elsewhere but did not list these two. - **Where:** `templates/applications/interview_list.html:70-73` (`{% translate "with" %}` before the first name, `,` between the rest); `templates/applications/application_detail.html:284-288` (`{% translate "With" %}`, then names joined with `, `). - **What happens:** a translator sees `msgid "with"` and `msgid "With"` with nothing saying they introduce the people at an interview, and has no way to move the names, add a particle after them, or use the language's own list separator (Arabic `،`, Chinese and Japanese `、`). The rendered line keeps English word order and punctuation in every language. - **Why it matters:** the interview list and the application page read unnaturally outside English, and a bare `with` is the kind of short msgid that later collides with another use of the same word. - **Fix:** join the names in the view, or with a small filter whose separator is translatable (with a translator comment), and render one `{% blocktranslate with people=names %}with {{ people }}{% endblocktranslate %}` per page, each with a `context` or translator comment saying it introduces the people at an interview. ## Done when - A test in `tests/test_interviews.py` renders the interview list and the application page in a test locale whose catalogue translates the whole phrase and the separator, and asserts both appear; and `makemessages` no longer extracts a bare `msgid "with"`.
tiagoagueda added this to the 0.6.0 milestone 2026-10-01 10:48:29 +00:00
Author
Owner

Landed on main with a green Forgejo CI run. Its entry in the CHANGELOG's Unreleased section ends in (#627).

Landed on main with a green Forgejo CI run. Its entry in the CHANGELOG's Unreleased section ends in (#627).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Postulo/postulo#627
No description provided.