issue 13018: translate does not accept immutable or const AAs

https://issues.dlang.org/show_bug.cgi?id=13018
maybe you don't want to call .array afterwards.

I just saw the bug and I already had worked on std.string, so I thought why not fix it.