-
Notifications
You must be signed in to change notification settings - Fork 597
Globalize:Provide Bidi structured text support to MessageFormat #599
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
Conversation
QUnit.test( "should support Bidi structured text", function( assert ) { | ||
assert.equal( | ||
Globalize( "he" ).messageFormatter( "helloArray", true )( "Beethoven", "Mozart" ), | ||
"\u05e9\u05dc\u05d5\u05dd, \u200FBeethoven\u200F & \u200FMozart\u200F" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we replace \u05e9\u05dc\u05d5\u05dd
with real characters like שלום
and do the same for all other visual characters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this involves changing corresponding files to Unicode format, would you mind this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's already utf-8
to me, so no problem. cc/ @jzaefferer for confirmation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange, on Windows if one saves some file as having either Unicode or utf-8 encoding using Notepad, it adds special BOM characters at the beginning, and I do not se any in
message-formatter.js
But, after all, having sample of Hebrew or Arabic text isn't important that much, so I can just use English in this test file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So please leave it as is. I can do this change later.
@ashensis much better 😄 I left a couple of comments, please just let me know if you have any questions. |
Leaving a dummy comment to assure future automatic notifications on this PR. |
Hi @rxaviers |
As per discussion in #539 (comment)
this PR is based on corresponding feature been recently introduced in SlexAxton/messageFormatter.js
(see messageformat/messageformat#129)
It provides an ability to enforce Bidi structured text in message being formatted by using Unicode Bidi control characters. The upgrading qualities are: