mbi / django-rosetta

Rosetta is a Django application that eases the translation process of your Django projects
MIT License
1.07k stars 195 forks source link

Updating docs to get ROSETTA_LANGUAGE_GROUPS=True working #279

Open Skrattoune opened 1 year ago

Skrattoune commented 1 year ago

Hi,

I'm new to Rosetta, and everything seems to be working fine, but I have a need to give a language-specific access to the translators.

While the access for Superuser works fine, and access through the global translators group works ok, I'm not able to have access for users defined in the translators-sr or translators-fr where I should see the different django.po and djangojs.po corresponding files

I'm in fact always sent back to the login page http://127.0.0.1:8000/accounts/login/?next=/translations/files/project/ showing that I miss specific access to the rosetta page.

Skrattoune commented 1 year ago

OK, I was testing something else, and realised that if my user is BOTH in the translators-sr and the generic translators group, suddenly my user sees only the languages he has been assigned to.

Therefore, I guess the the help should be modified from:

ROSETTA_LANGUAGE_GROUPS: Set to True to enable language-specific groups, which can be used to give different translators access to different languages. Instead of creating a global translators group, create individual per-language groups, e.g. translators-de, translators-fr, and assign users to these.

to ROSETTA_LANGUAGE_GROUPS: Set to True to enable language-specific groups, which can be used to give different translators access to different languages. In addition of creating a globaltranslatorsgroup, create individual per-language groups, e.g.translators-de,translators-fr, and assign users to **both** the global translators group and the language-specific groups they need access to.