Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The error:
localize.drupal.org "Not allowed to submit translations in this language."
The error occurs after translate a string to German with the Localization client.
Drupal 7.14
API key correct installed.
I'm member of the German user group.
I guess I'm not alone with this error.
Comment | File | Size | Author |
---|---|---|---|
#50 | 1673074-49-l10n_remote_og_permissions.patch | 3.5 KB | SebCorbin |
#49 | 1673074-48-l10n_remote_og_permissions.patch | 3.3 KB | SebCorbin |
#20 | 1673074_php_5.3_error.patch | 1.14 KB | SebCorbin |
#18 | 1673074_php_5.3_error.patch | 735 bytes | SebCorbin |
#17 | 1673074_php_5.3_error.patch | 755 bytes | SebCorbin |
Comments
Comment #1
Gábor HojtsyYou can submit translations to German on the localize.drupal.org user interface itself? (Being a member of a group does not in itself guarantee you actually have permissions in the group).
Comment #2
quiptime CreditAttribution: quiptime commentedCurrently I have 55 approved German translations. All realized with the webinterface of localize.drupal.org.
How get informations about my permissions of a language group?
My localize.drupal.org account not contain such information.
Comment #3
Gábor HojtsyMy question was not whether you have been able to submit translations before. Can you please try and answer my question?
Comment #4
quiptime CreditAttribution: quiptime commentedYes I can.
See
Comment #5
Gábor HojtsyWhat I pointed out is that you have previously submitted translations is not indicative of whether you can currently do that, right? That statement did not help me understand whether you can currently submit translations. Whatever.
Have you been able to submit translations *earlier* using the l10n_client module, and it suddenly stopped working or is this a fresh setup? Do you have permission to submit to any other groups, and can you submit translations there? (Feel free to join the test language group to test, if you don't want to leave useless testing contributions around).
Comment #6
quiptime CreditAttribution: quiptime commentedNo, there is no previous use of l10n client.
I work on fresh setup (since 3 days).
Test-language group?
How can find a hint to join the test-language group?
Comment #7
Gábor Hojtsyhttp://localize.drupal.org/translate/languages/test
Comment #8
UrmasZ CreditAttribution: UrmasZ commentedSame problem here translating into estonian.
I am member of Estonian team group.
API key is correct.
I can translate without errors using http://localize.drupal.org/translate/languages/et/translate. I can translate my site without errors using Drupal's translating system. And I can translate my site using Localization Client, but it gives me mentioned error by quiptime.
It was working some time ago, but not now. Not working a month or something like that. Can't remember exactly. And I know, we are not the only ones that have this problem.
I have patched my Localization Client installation with http://drupal.org/node/1026048. Not sure, if this is the reason or not. :D Quiptime, are you using this patch also?
Comment #9
quiptime CreditAttribution: quiptime commented@UrmasZ,
no. I'm not using the patch.
Comment #10
Gábor HojtsyThis is becoming interesting :) I don't know of any changes on the server that should have made this happen (and have not heard about this report before, so UrmasZ's confirmation is good). I'll try to ask Sebastien to look at this.
Comment #11
UrmasZ CreditAttribution: UrmasZ commentedGábor Hojtsy, if you translate something with localization client, you have no errors?
Comment #12
Gábor HojtsyMarked #1676464: Translation rejected by http://localize.drupal.org. Reason: Not allowed to submit translations in this language. as a duplicate.
Comment #13
lsolesen CreditAttribution: lsolesen commentedI can confirm that I am able to save a translation on http://localize.drupal.org/translate/languages/da/translate?project=&sta..., but is also rejected. For Danish translations.
Comment #14
Thomas_Zahreddin CreditAttribution: Thomas_Zahreddin commentedhi,
i checked the rights of user quiptime (since he wrote me a e-mail in the beginning of this issue):
he has (since a long time) the role translation team member
-> we tested that quiptime is able to add translation suggestions via web-interface (works).
So the rights should be sufficient, and he added also suggestions via web-interface in the last week.
(So i think the permissions are ok, which we tested first).
(I do not use the localization client, so i have no expirience with this module).
Comment #15
Gábor HojtsyOk I looked into the module code and seems like we'd not get a better idea from looking at watchdog logged response information either: http://drupalcode.org/project/l10n_client.git/blob/refs/heads/7.x-1.x:/l... (the same message is printed to the user). I also verified the module is turned on on localize.drupal.org to handle the remote submissions (plus you would not get this error if it would not be enabled anyway).
Then looked at the code for the l10n_remote module, and where this error is reached. See http://drupalcode.org/project/l10n_server.git/blob/refs/heads/6.x-3.x:/l... - at this point your user token is checked and various higher level permissions are checked. This permission check is done after the group context is set to check your permissions. So looks like that group context is not properly set. I'm wondering what happened there, since I have not seen any updated to the l10n_groups module either that does a similar groups context setting when in the web UI, so if you are allowed to submit things there, you should still be able to submit strings here. However, it is not the exact same code, so there is still the possibility that something changed in og user roles or og that would need to be updated here.
That is all I found so far.
Comment #16
Gábor Hojtsy@sebcorbin tracked it down further to this l.d.o watchdog entry: Warning: Parameter 1 to og_user_roles_grant_roles() expected to be a reference, value given in module_invoke() (line 461 of /var/www/localize.drupal.org/htdocs_bzr/includes/module.inc)., which is directly related to the l10n_remote code I pasted above, which uses module_invoke(). It was merely done to avoid doing a function_exists() (or module_exists()) wrapper around this code.
Drupal.org servers were recently updated to PHP 5.3, that is the underlying reason for us now getting this error. @sebcorbin is looking to provide a patch.
Comment #17
SebCorbin CreditAttribution: SebCorbin commentedComment #18
SebCorbin CreditAttribution: SebCorbin commentedwoops
Comment #19
Gábor HojtsyWell, the problem is down in the code, not exactly there. I'd do something like:
That is getting rid of the module invoke's in favor of a module_exists() wrapper (that in itself should already ensure og user groups and ogur exists?). If ogur is not a direct requirement of l10n_groups, then function_exists() there too before invoking it. We need to directly invoke it, so arguments are taken by reference as needed.
Comment #20
SebCorbin CreditAttribution: SebCorbin commentedComment #21
quiptime CreditAttribution: quiptime commentedNo reviewers available?
Comment #22
Sahin CreditAttribution: Sahin commentedFYI, we in Turkish group get the same error messages while sending translations by Localization client although can translate on the server without a problem.
But this comment is about another strange thing that happened some time ago, though cannot remember the exact date:
More than a thousand new Turkish suggestions (re)appeared out of the blue, while this number was only 3 a while ago. All of these translation suggestions are dated old, and I can clearly remember at least some of them were declined before.
I do not know the reason and am not sure whether this is related with the mentioned php update, but maybe can give a hint.
Comment #23
Sutharsan CreditAttribution: Sutharsan commented#20 patch is code like as suggested by Gábor. No code style problems found. I have not tested the code and therefore I don't want to put it on RTBC myself.
Comment #24
PROMESsubscribe
Comment #25
droplet CreditAttribution: droplet commentedTesting locally without patch and works fine. what's the LDO module version ?
my list:
** Localization server (git 6.x-3.x)
Comment #26
DuaelFrSame issue with my French translations but I cannot review patches as I have no translation server installed...
Comment #27
bas.hr CreditAttribution: bas.hr commentedSame in Croatian...
Comment #28
dp85 CreditAttribution: dp85 commentedSame in German.
Comment #29
bricel CreditAttribution: bricel commentedSame issue in Hebrew.
Comment #30
podarok#20 looks good for me
Comment #31
majovdh CreditAttribution: majovdh commentedsame in dutch subscribing
Comment #32
lismail CreditAttribution: lismail commentedI use version 7.x-1.1 and have same issue in Indonesian. API key is correct and I can manually submit translation to http://localize.drupal.org. It is just stop working. It used to run normally some time ago.
Comment #33
gedvan CreditAttribution: gedvan commentedAny update?
I'm having this problem in Portuguese, Brazil too.
Comment #34
podaroklooks like critical issue
Comment #35
hansfn CreditAttribution: hansfn commentedI'm having this problem too (in Norwegian Bokmål, long time translator/contributor) and reported it in #1801898: l10n_client - "Not allowed to submit translations in this language." which has been closed as a duplicate of #1759780: Can't do remote submission to LDO server which seems to be a duplicate of this one ...
Comment #36
SebCorbin CreditAttribution: SebCorbin commented#20 committed, issue should disappear on l.d.o in a few days
Comment #37
lismail CreditAttribution: lismail commentedHi,
Still not working with me. I am using Localization client 7.x-1.1 for Indonesian translation.
Regards,
Lucky
Comment #38
Sutharsan CreditAttribution: Sutharsan commented@lismail, "... issue should disappear on l.d.o in a few days". Be patient.
Comment #39
SebCorbin CreditAttribution: SebCorbin commentedJust pushed to prod, happy translating everyone!
Comment #40
Sahin CreditAttribution: Sahin commentedTested and worked!
So happy to meet our one and only sweet server again!
Thanks to all contributers.
Comment #41
lismail CreditAttribution: lismail commentedIt works as before.
Thank you. You rock!
@Sutharsan, thanks for reminding me :D
Cheers,
Lucky I. Ismail
Comment #42
Gábor HojtsyThanks SebCorbin for providing the patch and pushing it through! Excellent work :)
Comment #43
PROMESThanks, I can send my translations again!
Comment #45
s_leu CreditAttribution: s_leu commentedThis hasn't been ported to 7.x-1.x yet.
Comment #46
s_leu CreditAttribution: s_leu commentedI tried to apply the changes of the 6.x-1.x patch to 7.x-1.x and found that the og_user_roles_grant_roles() and og_get_group_context() don't exist anymore in the drupal 7 version of og. Unfortunately i don't know the og module at all and i can't figure out which functions do have to be used instead of the mentioned ones.
Would be great if someone, that was in involved in the development of the l10n_groups module or someone with more knowledge about the og module could look into that.
Comment #47
Gábor HojtsyDrupal 7 og includes the per group permissions feature, while in Drupal 6 it was in another module called og_user_roles. I did not look into how this is implemented in 7 in OG so don't have direct suggestions. This is related to #2039557: l10n_groups access callback always return FALSE. Same thing there.
Comment #49
SebCorbin CreditAttribution: SebCorbin commentedI need another pair of eyes on this. Basically:
og_user_roles_grant_roles
doesn't exist anymore in OG7 so I needed to useog_user_access
l10n_groups_set_context
since$langcode
parameter was ignoredComment #50
SebCorbin CreditAttribution: SebCorbin commentedReviewed with Gabor and committed