Skip to content

Conversation

infosrabah
Copy link
Contributor

No description provided.

@felixxm felixxm changed the title Update formats.py Updated Algerian Arabic (ar_DZ) locale formats. Feb 6, 2020
Copy link
Member

@felixxm felixxm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@infosrabah Thanks 👍

@felixxm
Copy link
Member

felixxm commented Feb 7, 2020

@infosrabah Apart from you support question, Should we update formats for Algerian Arabic?

(\cc @claudep).

@claudep
Copy link
Member

claudep commented Feb 7, 2020

It's very important that the format settings represent the real way date and time is presented in your country in Arabic. It should absolutely have nothing to do with any technical problem you may have with bootstrap or any other tool.

For example, on Wikipedia (https://en.wikipedia.org/wiki/Algeria), the documented date format is dd/mm/yyyy (d/m/Y).

@infosrabah
Copy link
Contributor Author

infosrabah commented Feb 7, 2020

Yes update the format Felix, please.

Hi claude,

I agree about what you said,

But we do have 2 major languages in Algeria(French and Arabic), the date that your are refering to is for fr-FR wich is dd/mm/yyyy (d/m/Y). but I here we are talking about another flavour : ar-DZ wich is completly the RTL way (opposite) : yyyy/mm/dd (Y/m/d). and this is represent exactly the real way date and timeI in algeria.

I may in the future create a fr-DZ formats.py wich is almost the same as fr-FR.

And beside of that. I do not witness any technical problem you mentioned about bootstrap or any other tool. I just asked Felix on the fly about the way to get the actual coutry format that has been applied to a date. just to convert that and pass it to front-end tool (bootstrap datepicker). So there will be some consistency between the two world (front-end and backend), and that makes your life much easier when it comes about (Validation).

Thank you Claude

@claudep
Copy link
Member

claudep commented Feb 7, 2020

As I can see, the current format of RTL languages like Arabic, Hebrew and others are still using the d‏/m‏/Y syntax in format settings. Maybe something to ask on the django-i18n mailing list?

@infosrabah
Copy link
Contributor Author

Hi Claude,

Here's as examples of some local news paper online website and even a lcoal TV website formats used : (dates are surrounded green)

1 - News paper 1 https://ibb.co/d6Cyshd
2 - News paper 2 (Sport) https://ibb.co/frrd9fP
3 - Local TV https://ibb.co/85Bh53R

Now if most RTL other countries are using or still using 'd‏/m‏/Y ' as you said, my country is not. as you said you have to make it reflect as in real life (that's what I'm trying to do).

For every date on any ressource (News, Official communications, News papper) that using Arabic as a language, the Date format is 'Y/m/d'.

About the wikipedia that you posted about Algeria and the Date format used 'dd/mm/yyyy' (d/m/Y). This applies for the French language in Algeria (fr-DZ) LTR, not the arabic (ar-DZ) that we are talking about here.

Hope I shed more light on this post and gave you more reasons to convice you that the Date format for Arabic Algeria (ar-DZ) is 'Y/m/d'.

Thank you.

@claudep
Copy link
Member

claudep commented Feb 9, 2020

That's very precious data, thanks! Now may I ask you to create a ticket and provide the information you just wrote to that ticket? Ticket data is supposed to be kept long term, contrary to pull request comments.

Are you also able to confirm that what you said is only for short dates, and that the "normal" date format is still "day month year" (j F Y)?

@infosrabah
Copy link
Contributor Author

infosrabah commented Feb 10, 2020

Hi claude,

Thank's for the quick answer.

For the nomal date format I confirm it, it's the same as you said. ( j F Y ). I used this format ( j F Y ) and the date rendred well in djkango template for RTL, you can refer to the news paper number 1 in the top of the page surrounded green. so far so good.

Now, do you want me to go to "Django's bug tracker and wiki" and create a new ticket ??

If so, what do you want me excatly to write out-there ???, this is not a bug/issue, this is settings country format for a specific language. !!, I'm confuse !

Thank you Claude,

Hope to hear from you soon.

@felixxm
Copy link
Member

felixxm commented Feb 12, 2020

@infosrabah I'm also confused, TBH 😄 Please create a new ticket and describe what is incorrect/missing in the current Algerian Arabic (ar_DZ) locale formats. Should we update only SHORT_DATE_FORMAT? or maybe all change from this PR are required.

This is still an issue in Django even if it's only in a country specific format.

@infosrabah
Copy link
Contributor Author

infosrabah commented Feb 12, 2020

HI Felix,

All change from this PR are required.

Now for the "SHORT_DATE_FORMAT" is little bit different when it comes about arabic, to be specific there's isn't, meaning we do not have Short version of month like "Jan","Fev"... "Dec", We do have a whole Month names "January" in Arabic, Month can't be can't trunc to get a Short version.

What the fall-back if "SHORT_DATE_Format" is commented ??, if the fall-back is "DATE_FORMAT" then comment "SHORT_DATE_FORMAT". and yes Update all changes. please

I'm gonna create a new ticket sure.

Thank you Felix

@felixxm felixxm changed the title Updated Algerian Arabic (ar_DZ) locale formats. Fixed #31268 -- Updated Algerian Arabic (ar_DZ) locale formats. Feb 13, 2020
@felixxm
Copy link
Member

felixxm commented Feb 13, 2020

@infosrabah Thanks 👍 I changed SHORT_DATETIME_FORMAT = 'j N Y H:i' to 'Y/m/d H:i', because if abbreviations of months don't exist in Algerian Arabic we shouldn't use N in formats. Can you confirm the current form?

@felixxm felixxm self-assigned this Feb 13, 2020
@infosrabah
Copy link
Contributor Author

infosrabah commented Feb 13, 2020

Hi Felix,

Ticket created at : https://code.djangoproject.com/ticket/31268

Amazing, YES I CONFIRM THE FORM : SHORT_DATETIME_FORMAT = 'Y/m/d H:i'

I have a lots in mind right now, so it's kind of hard to keep up and follow, LoL.

But What about (DATE_INPUT_FORMATS, TIME_INPUT_FORMATS, DATETIME_INPUT_FORMATS) ????,
really interesting about inputs format to be reflected to django forms.

Thank you

@felixxm
Copy link
Member

felixxm commented Feb 14, 2020

But What about (DATE_INPUT_FORMATS, TIME_INPUT_FORMATS, DATETIME_INPUT_FORMATS) ????,
really interesting about inputs format to be reflected to django forms.

I'm not really understand what's the question? Please approve this PR if these changes work for you and if something should be changed you can push changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants