Company page: names in other languages in a popover from a languages icon beside the name, edited under Edit #917

Closed
opened 2026-10-15 17:19:38 +00:00 by tiagoagueda · 0 comments
Owner

On a company's page, the names in other languages are read from a languages icon beside the company's name, which opens a popover listing them. Adding, fetching and removing them moves to the company's edit view.

What exists today

  • templates/jobs/company_detail.html: the heading is <c-page-title>{{ company.name }}</c-page-title> inside #company-head, beside the logo.
  • Further down the main column, a section data-company-names ("Names in other languages", #673) does everything in place. It lists each name (company_names: language, name in <bdi lang>, source) with a Remove button, offers Fetch from Wikidata (jobs:company_wikidata) when wikidata_offered and the company has a Wikidata ID, and has an add form (Language select + "Its name in that language"). All of these post to jobs:company_names.
  • templates/jobs/company_form.html (jobs:company_update) has no names section. It is one form, and dialogs that post elsewhere (the logo's, #853) are drawn outside it.
  • Basecoat's popover is imported (popover, used by the account menu and <c-dropdown-menu>), and the Lucide set is listed in assets/icons.txt.

What would change

Company page

  • The section data-company-names is removed from the page.
  • When the company has at least one name in another language, a button with Lucide's languages icon follows the H1. Pressing it opens a Basecoat popover that lists each name with its language (the language in the interface's words, the name in <bdi lang="…">), read-only.
  • With no other names, no icon is drawn.

Edit view

  • The list, Remove, Fetch from Wikidata and the add form move to company_form.html as their own card. They post to jobs:company_names as now, from forms outside the main form or through form= attributes (the logo dialog's pattern, #853), and return to the edit view (next).
  • The sentence "Give the company its Wikidata identifier, under Edit, …" is reworded now that it sits on Edit itself.

Accessibility

  • The icon button is named "Names in other languages" (aria-label or sr-only text), has aria-haspopup and aria-expanded, and opens and closes from the keyboard. Escape closes it and returns focus to the button. A tooltip with the same words is shown on hover and focus.
  • With scripts off, the popover must still be reachable (Basecoat popover via popovertarget, as the account menu does).

Notes

  • New or changed strings (the button's name and the reworded sentence) go through the catalogues and Weblate.

Related: #673, #853, #851.

Checked against main at 56fc9d531.

On a company's page, the names in other languages are read from a *languages* icon beside the company's name, which opens a popover listing them. Adding, fetching and removing them moves to the company's edit view. ## What exists today - `templates/jobs/company_detail.html`: the heading is `<c-page-title>{{ company.name }}</c-page-title>` inside `#company-head`, beside the logo. - Further down the main column, a section `data-company-names` ("Names in other languages", #673) does everything in place. It lists each name (`company_names`: language, name in `<bdi lang>`, source) with a *Remove* button, offers *Fetch from Wikidata* (`jobs:company_wikidata`) when `wikidata_offered` and the company has a Wikidata ID, and has an add form (Language select + "Its name in that language"). All of these post to `jobs:company_names`. - `templates/jobs/company_form.html` (`jobs:company_update`) has no names section. It is one form, and dialogs that post elsewhere (the logo's, #853) are drawn outside it. - Basecoat's popover is imported (`popover`, used by the account menu and `<c-dropdown-menu>`), and the Lucide set is listed in `assets/icons.txt`. ## What would change **Company page** - The section `data-company-names` is removed from the page. - When the company has at least one name in another language, a button with Lucide's `languages` icon follows the H1. Pressing it opens a Basecoat popover that lists each name with its language (the language in the interface's words, the name in `<bdi lang="…">`), read-only. - With no other names, no icon is drawn. **Edit view** - The list, *Remove*, *Fetch from Wikidata* and the add form move to `company_form.html` as their own card. They post to `jobs:company_names` as now, from forms outside the main form or through `form=` attributes (the logo dialog's pattern, #853), and return to the edit view (`next`). - The sentence "Give the company its Wikidata identifier, under Edit, …" is reworded now that it sits on Edit itself. ## Accessibility - The icon button is named "Names in other languages" (`aria-label` or `sr-only` text), has `aria-haspopup` and `aria-expanded`, and opens and closes from the keyboard. Escape closes it and returns focus to the button. A tooltip with the same words is shown on hover and focus. - With scripts off, the popover must still be reachable (Basecoat popover via `popovertarget`, as the account menu does). ## Notes - New or changed strings (the button's name and the reworded sentence) go through the catalogues and Weblate. Related: #673, #853, #851. Checked against `main` at `56fc9d531`.
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#917
No description provided.