Updated: Comment #0

Problem/Motivation

For config_translation.module we need a way to check whether a translation exists for a certain config name. This is only related to the locale override system and is not related to the config translation system in particular, so it should not be added there.

Proposed resolution

Add a "hasTranslation()" utility method to LocaleConfigManager.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tstoeckler’s picture

Status: Active » Needs review
FileSize
5.46 KB

Here we go.

Status: Needs review » Needs work

The last submitted patch, locale-config-manager-has-translation.patch, failed testing.

Gábor Hojtsy’s picture

sxnc’s picture

Assigned: Unassigned » sxnc
Issue tags: -D8MI, -sprint, -language-config, -blocker
sxnc’s picture

Status: Needs work » Needs review
Issue tags: +D8MI, +sprint, +language-config, +blocker
FileSize
5.99 KB
Gábor Hojtsy’s picture

Re-uploading for testbot sanity. We need it to return data for us.

Status: Needs review » Needs work

The last submitted patch, locale-config-manager-has-translation-2098697-5.patch, failed testing.

tstoeckler’s picture

Status: Needs work » Needs review
FileSize
2.4 KB
4.56 KB

I don't think that #5/#6 are the correct fix.

Gábor explained that there's a problem with empty config files because they get imported and also their schema is getting parsed. This seems to be the problem. I've removed those files. So we can't test the hasTranslation() behavior with empty translation files, but we can't have empty translation files without other stuff failing anyway, so I think that's OK.

Sorry @sxnc for taking this over, hope that's OK.

Let's see if that passes.

Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

Looks good! Reviewed in person.

sxnc’s picture

@tstoeckler np! i thought i had it fixed but its good to see what the actual problem was, thanks a lot! :)

webchick’s picture

Status: Reviewed & tested by the community » Needs work

Doesn't seem to apply for me. :(

Gábor Hojtsy’s picture

Status: Needs work » Needs review
Issue tags: -D8MI, -sprint, -language-config, -blocker
Gábor Hojtsy’s picture

Issue tags: +D8MI, +sprint, +language-config, +blocker
Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

Still applies/passes with the testbot in the past 2 days. @webchick can you try again? :) Thanks!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Huh. No idea what that was about.

Committed and pushed to 8.x. Thanks!

Gábor Hojtsy’s picture

Issue tags: -sprint

Thanks a lot! Woot!

Automatically closed -- issue fixed for 2 weeks with no activity.