Skip to content
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

agenda does't work if I use Arabic Language #2823

Closed
Mo-dot2 opened this issue Mar 4, 2019 · 15 comments
Closed

agenda does't work if I use Arabic Language #2823

Mo-dot2 opened this issue Mar 4, 2019 · 15 comments

Comments

@Mo-dot2
Copy link

Mo-dot2 commented Mar 4, 2019

Describe
I can't add or view events when I use Arabic Language

To Reproduce

  1. change platform language to Arabic (or user language, user selected language)
  2. Click on 'personal agenda' (in Arabic "أجندتي")
    or clicking on agenda icon from any course, or clicking on global agenda from administration tab.
  3. you'll see "loading" as shown in screenshot and you won't be able to add or view any events

Expected behavior
you'll see "loading" as shown in screenshot and you won't be able to add or view any events.

Screenshots
loading

Desktop (please complete the following information):

  • OS: [Windows 10]
  • Browser [chrome Version 72.0.3626.119 and firefox 65.0.1]
    I also tried it on chrome mobile application running on android 7

**Server
I have this error in ♥ Chamilo ♥ version 1.11.4 on php 7
also I had the same error in ♥ Chamilo ♥ version 1.11.8 on php 7.2
OS (linux)

Additional context
I experience this error only when language is set on Arabic, but there is no problem when I change the language back to English.

@ywarnier
Copy link
Member

ywarnier commented Mar 4, 2019

Hi @Haboubi92
Thanks for reporting issues with the Arabic language. We have no beta-tester in Arabic so far, so your report is very welcome. We'll have a look and hopefully get that fixed for you before the release of 1.11.10 (this week or the next).
Also, if you feel like we should improve other aspects (we're by no means considering we're doing a good job for Arabic) don't hesitate to open new issues. One issue opening per problem/improvement please.

@ywarnier ywarnier added this to the 1.11.10 milestone Mar 4, 2019
@Mo-dot2
Copy link
Author

Mo-dot2 commented Mar 4, 2019

Hi @Haboubi92
Thanks for reporting issues with the Arabic language. We have no beta-tester in Arabic so far, so your report is very welcome. We'll have a look and hopefully get that fixed for you before the release of 1.11.10 (this week or the next).
Also, if you feel like we should improve other aspects (we're by no means considering we're doing a good job for Arabic) don't hesitate to open new issues. One issue opening per problem/improvement please.

thank you so much for your reply ♥

@ywarnier
Copy link
Member

ywarnier commented Mar 5, 2019

OK, so the first issue here (not the only one apparently) is that we are missing the translations for the calendar UI, which is a bit tricky because we depend on a plugin of jquery-ui-calendar for that.

The best way to deal with this would be for you to translate the corresponding file here: https://github.com/trentrichardson/jQuery-Timepicker-Addon/tree/master/dist/i18n

Apparently someone already did that here: trentrichardson/jQuery-Timepicker-Addon#956 but the author of the library did not accept it yet (since September). I'm adding a comment there to ask him to do so. I suggest you also do it, so it is included.

This is not all though, there seems to be another issue.

ywarnier added a commit that referenced this issue Mar 5, 2019
@ywarnier
Copy link
Member

ywarnier commented Mar 5, 2019

I've sent the previous change to Chamilo to prevent the page from failing on the missing .ar.js file. I'm having another issue now but I'm not entirely sure this is not some caching side-effect (of attempting to just create the .ar.js file, which didn't work as is).

@ywarnier
Copy link
Member

ywarnier commented Mar 5, 2019

OK, so the remaining issue with adding an event is that the ajax is called with arabic characters for the dates: /main/inc/ajax/agenda.ajax.php?type=personal&a=get_events&start=٢٠١٩-٠١-٢٨&end=٢٠١٩-٠٣-١١&_=1551747984935
This is... unexpected

@ywarnier
Copy link
Member

ywarnier commented Mar 5, 2019

@jmontoyaa it looks like we are doing one convertion to Arabic in the start and end variables that we shouldn't do (or if we do, we should also convert it back to English universal dates in order to store them in the database).
Any thought?

@ywarnier
Copy link
Member

ywarnier commented Mar 6, 2019

@Haboubi92 not sure that is you, but if it is: thank you for updating the translation to Arabic from https://translate.chamilo.org/ ! Much appreciated.

@ywarnier ywarnier assigned ywarnier and unassigned jmontoyaa Mar 6, 2019
@Mo-dot2
Copy link
Author

Mo-dot2 commented Mar 6, 2019

@ywarnier
it's my duty to translate ♥ Chamilo ♥ to Arabic
there's a lot of variables to translate
I hope I would finish most of theme in the next few days before 1.11.10 update

@AngelFQC
Copy link
Member

AngelFQC commented Mar 6, 2019

I sent a two commits to fix the agenda. Works for me now, adding and getting events.

imagen

@Mo-dot2
Copy link
Author

Mo-dot2 commented Mar 6, 2019

@AngelFQC
thank you so much ♥

@ywarnier
Copy link
Member

ywarnier commented Mar 6, 2019

Because of the issue, some incorrect events might have created in the database, which might block the use of the calendar anyway. To fix those, you can run (safely) the 2 following queries in your database:

delete from personal_agenda where date is NULL;
delete from c_calendar_event where start_date is NULL;

@ywarnier
Copy link
Member

ywarnier commented Mar 6, 2019

I have updated https://11.chamilo.org and https://campus.chamilo.org with the fix, so @Haboubi92 you should be able to test it on any of those 2 portals and confirm it is working.

@ywarnier
Copy link
Member

ywarnier commented Mar 6, 2019

@Haboubi92 a quick question: are calendars normally also presented this way (from right to left) in arabic? We're not sure it should be like that...

@Mo-dot2
Copy link
Author

Mo-dot2 commented Mar 6, 2019

@ywarnier
I tried it on https://campus.chamilo.org and it works perfectly fine
as for Arabic calendar layout, yes it's presented from right to left

@ywarnier
Copy link
Member

ywarnier commented Mar 6, 2019

Excellent news!
We're planning for a release around the 15th of March (I'm saying that to give you an idea for the translation effort).

@ywarnier ywarnier closed this as completed Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants