Problem
On Drupal 7 the translation group form only offers languages that are active and have no group yet, refuses to create a group when every language has one, and does not let the language of a group change. The group information block on the language pages shows the group manager, an edit link for those who may edit the group, the member count for members, a join or leave link, and asks anonymous visitors to register or log in. On 3.0.x the group form is the plain Group module form: the language is a free autocomplete field, a second group for a language can be created and the language can be changed afterwards, which breaks the one group per language assumption of the language pages. The block shows only the manager and the join or leave link. The board path alias of a group is created on insert and never removed.
Proposed resolution
- The group add form gets the language as a select of the active translation languages without a group, with the Drupal 7 description. When no language is left, the Drupal 7 error message shows and the submit button is disabled.
- The group edit form shows the language disabled, "This cannot be modified."
- Deleting a group removes its board path alias.
- The group information block adds the edit link for those who may update the group, the member count (linked to the member list where that is accessible) for members and those administering members, and the Drupal 7 register or log in text for anonymous visitors, following the site registration setting.
The group type and its language field still come from site configuration only, as before, that is a separate decision.
Tests
Drupal 7 first, a new L10nGroupsTestCase: testOneGroupPerLanguage() creates the groups for two languages through the form, checks the languages offered, the fixed language on edit and the message once no language is left; testGroupInformationBlock() checks the block for the owner, a member, an outsider and an anonymous visitor. Both ported to L10nGroupsDecorationTest, where the test group type mirrors the live site (the creator becomes the group administrator, no wizard).
LLM disclosure
LLM was used to find, diagnose explain and fix this issue. With human review.
Comments
Comment #4
gábor hojtsy