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

Adding national calendar support to 'debug messages' #978 #980

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

AhmedMustafa
Copy link

Adding national calendar support to 'debug messages' #978

{id:"menu-item-calendars-default",toggle:"calendar-type",label:RED._("menu.label.view.defaultCalendar"),selected: true, onselect:function(s) { if(s){RED.text.bidi.setCalendarType("gregorian")}}},
{id:"menu-item-calendars-hijri",toggle:"calendar-type",label:RED._("menu.label.view.hijri"), onselect:function(s) { if(s){RED.text.bidi.setCalendarType("hijri")}}},
{id:"menu-item-calendars-hebrew",toggle:"calendar-type",label:RED._("menu.label.view.hebrew"), onselect:function(s) { if(s){RED.text.bidi.setCalendarType("hebrew")}}}
]},
Copy link
Member

Choose a reason for hiding this comment

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

Is there any way to infer the user's preference based on other things? We don't want to fill the menu with options like this. Same question goes for the text direction options @wajnberg.

Copy link
Author

Choose a reason for hiding this comment

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

The user should be able to select his preferred calendar type -as in Windows. Many users in the Arabic countries may prefer to get the dates in Gregorian even if the App was translated into Arabic, this is common case and can't be ignored.
The national calendar doesn't depend on the language nor the GUI direction so it can't be inferred.

@coveralls
Copy link

coveralls commented Sep 7, 2016

Coverage Status

Coverage remained the same at 88.294% when pulling ab7e575 on ACGC:0.15.0 into 722b31e on node-red:0.15.0.

options = lang + "-u-ca-islamic";
else if(RED.text.bidi.getCalendarType() === "hebrew")
options = lang + "-u-ca-hebrew";
return d.toLocaleString(options);
}
Copy link
Member

Choose a reason for hiding this comment

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

As we're likely to have other places that need to format a Date object properly, this code should be a utility function in bidi.js

@coveralls
Copy link

coveralls commented Sep 7, 2016

Coverage Status

Coverage remained the same at 88.294% when pulling 0a6bce0 on ACGC:0.15.0 into 722b31e on node-red:0.15.0.

@knolleary
Copy link
Member

node-red-gitbot: please udpate cla status

@knolleary knolleary changed the base branch from 0.15.0 to master October 10, 2016 10:09
@knolleary
Copy link
Member

Note: not merging this until we have more progress on #983. We want to ensure a consistent approach taken with all of the globalisation work, such as how the user configures it and what utility functions are provided in the code.

@AhmedMustafa
Copy link
Author

I am sure @Ashamandi and @samarsultan will handle this.

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.

None yet

3 participants