Comments

blueminds’s picture

Status: Active » Needs review
StatusFileSize
new1.71 KB

Only removing duplicate mapping was needed, then renamed one variable to be more specific.

miro_dietiker’s picture

Why remove canTranslate()?
At least i'm expecting an explanation here.

berdir’s picture

Because the canTranslate() method is exactly what we marked as works as designed in the core issue, there's no need to have it and we actually double-map the languages. This is fine, no explanation necessary.

miro_dietiker’s picture

Issue tags: +Needs tests

I would expect a test to check for double mapping error.

berdir’s picture

Hm, the only case that could happen is if mappings are configured to map local languages that exist as remote languages to other remote languages. E.g. if de is mapped to de-CH and a second mapping maps de-CH to en-CH. Which I'm not sure is going to work properly anyway and is a quite weird use case :)

miro_dietiker’s picture

I would expect that through a double mapping it possibly maps to e.g. nothing since the (wrongly mapped) source key doesn't exist. Am i completely wrong?

berdir’s picture

No, the mapping just returns the same language code if there's no mapping for it.

blueminds’s picture

Patch that fixes mapping bug in getAvailableTiersOptions()

Status: Needs review » Needs work

The last submitted patch, tmgmt_mygengo-remote_lang_mapping-1999834-2.patch, failed testing.

berdir’s picture

Status: Needs work » Needs review

Thanks, committed and pushed.

berdir’s picture

Status: Needs review » Fixed

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