Closed Programmierus closed 4 years ago
What's the localization/version of your RC?
en-US. But I tried to change to others you have available, e.g. ru-RU: no change.
What's the version of your RC? Does the localization problem only happens on the list?
It's the latest dockerized RC with the image from here.
From what I can see the problem seems to be only on the list. Here is a full screenshot of the settings window with ru-RU localization:
(Partially translated, meaning the localization indeed kicks in).
Hmm... interesting. May investigate when I am available. Unfortunately I am quite busy recently :disappointed:
No rush here. I'll try to dig myself too and will let you know if I'll have any luck.
Let me know if you want me to conduct any more tests.
Could you try this patch for cloudview.php
?
@@ -401,7 +401,7 @@ final class cloudview extends AbstractRoundcubePlugin
return $localizations = $localizations ?? \array_map(
function (string $fqcn): string {
// "...\CloudView\Viewer\GoogleDocsViewer" to "GoogleDocs"
- $transKey = \substr(\basename($fqcn), 0, -6);
+ $transKey = \substr((new \ReflectionClass($fqcn))->getShortName(), 0, -6);
// "GoogleDocs" to "viewer_google_docs"
$transKey = 'viewer' . \strtolower(\preg_replace('/[A-Z]/S', '_$0', $transKey));
It looks like basename()
works for \
only on Windows (which I am on) according to PHP doc.
Confirm working. I'll also submit a PR soon with my contribution to localizations :)
Hello,
Thanks for a nice plugin! I've installed it within my dockerized setup, but somehow I am getting the list of viewers as following no matter what language I select. Already tried installing via composer and manually:
Thanks!