-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post time stamp not localized in Mobile mode #5482
Comments
We already had an issue which has been fixed and closed in May: #4718 (comment) I am not sure if someone checked if the localization is working. I can confirm this issue. |
I confirm that this bug is still there. |
I successfully reproduced the bug. It is not limited to 'es-AR', but affects any language (e.g. it). Translation should be available in the Javascript object Diaspora.I18n, however they are not loaded because in mobile version there's no Diaspora initialization, nor Diaspora.I18n.load(…) I think that it's only some server side code that is missing in the head section of the application layout. I'm going to investigate this issue further. |
Adding the translations doesn't fix this issue (already tried that) but is of course a required task to fix this. |
Added these dependencies in mobile.js:
Also added This partially solves the issue because the language gets properly set and the Diaspora.I18n.load() gets called. However, even if it gets executed, it doesn't seem to load the translations, which all result in empty strings. More in detail the problem relies in the
Thus also the translations loaded by timeago.js are all empty strings. A temporary patch would be to prevent timeago.js to load custom translations provided by Diaspora and use those that are already present in the plugin. Otherwise we must understand why in the mobile version Diaspora.I18n.load() doesn't load the translations that it receives in input. |
What I said above is summarized in this commit: collimarco/diaspora@8f6f71c354cf74 Pull that commit, visit /notifications, and see the Javascript console:
This means that when in mobile mode Diaspora.I18n.load() doesn't load the translations. For the rest this commit should fix the issue, because the jQuery plugin (timeago) is now properly called, it just doesn't find the translations. |
Solved! My considerations (#5482 (comment)) were correct, but you also need to add:
I'll post a commit with the complete solution as soon as possible |
Fixed via #5489 |
In mobile mode, set language to 'es-AR', post time stamp is shown as 'about 18 hours ago' and I expected 'cerca de 18 horas'.
The text was updated successfully, but these errors were encountered: