Closed BernhardPosselt closed 9 years ago
Was this discussed or are there more news on this?
I think this wasn't discussed yet. I talked to georg about this but I don't know the progress.
Btw, a second solution would be to provide this thing as a file with JavaScript variables, for instance:
OC.trans = {'I wasnt sure': "<?php p($l->trans('I wasn't sure'))" };
Do you want to lead the discussion and/or take this on?
Seems like too much work, I'm already working on the docs, apptemplate_advanced, news app and Google Code-In.
It would be great if the original author of the translation thing could take this up.
So what’s the resolution on this? cc @DeepDiver1975 @VicDeo @bantu @ringmaster what’s your call?
Regarding dialogs: afaik this was mainly done the described way in calendar - no idea on the current status. Regarding translations: we can have a look at this @ringmaster you are my new translation dev :wink: Wana have a look? THX
Not only this, it also hangs Chrome in some cases. See this painful bug: #4545
Can we schedule this for OC7 maybe ?
Maybe we can somehow generate a JSON bundle with all texts from the current app in it. Every app brings their own bundle. So t() just needs to access the bundle in global scope.
Not sure yet how to generate it, need to dive into the code first.
Setting to OC7.
The minimum implementation would preload all needed bundles and pre-cache them in the cache used by t(). The main goal is to prevent having synchronous ajax calls in the first place.
What’s the current state of this by the way? Do we still need it? Or is someone working on it?
Not possible short term. Needs architectural changes.
Concept in progress here: https://github.com/owncloud/core/issues/11532
Closing as fixed by https://github.com/owncloud/core/pull/11638
Loading translations and dialogues from the server via AJAX can take really long. If the user is not presented with feedback that something is loading, he'll click again after one second. I also think its really annyoing to have to wait, especially in the calendar
Solution:
Include dialogues in the HTML but mark them display: none. If you want to open the dialogue just set it to display: block
As for translation: Provide a hidden div with all translated sentences that can be read out via JavaScript.