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

Text Direction Controls in The Note Editor #157

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@fadishei

This patch adds RTL and LTR buttons to the note editor button set.

Dear Zotero Developers

Zotero is used all over the world today and thus it is expected that some of its users want to write notes in right-to-left languages such as Persian, Arabic, etc. Unfortunately, the ability to control text direction in the bundled TinyMCE editor within Zotero is currently missing. I've added this feature to the source and request that you include it in the main distribution. The modification is limited to a file addition (1333 bytes) and a file modification (two lines). This adds RTL and LTR buttons to the note editor button set.
Some forum discussion about this feature can be found at: http://forums.zotero.org/discussion/10879

This is a SMALL patch that would make a LARGE number of people happy with Zotero!

Thanks
Hamid Fadishei

dstillman added a commit that referenced this pull request Mar 5, 2013

Add LTR/RTL toggle in notes
Initialize the note editor with the default directionality based on the current locale, and add a single button for the opposite direction that functions as a toggle. This avoids needing two buttons.

We should also add locales to TinyMCE, but we can do that separately.

Closes #157
@dstillman

This comment has been minimized.

Show comment
Hide comment
@dstillman

dstillman Mar 5, 2013

Member

Let me know if this seems like an OK solution. (The 3.1 branch won't work in non-English locales until we merge new strings, but you can test it by temporarily hard-coding "rtl" as the locale in note.html.)

Member

dstillman commented Mar 5, 2013

Let me know if this seems like an OK solution. (The 3.1 branch won't work in non-English locales until we merge new strings, but you can test it by temporarily hard-coding "rtl" as the locale in note.html.)

@dstillman dstillman closed this Mar 5, 2013

@fadishei

This comment has been minimized.

Show comment
Hide comment
@fadishei

fadishei Mar 6, 2013

First, I think this is an OK solution because most non-English users prefer to use an English environment (menus, etc) that lets them input non-English content and this can work in 3.1 branch with my patch. The fact that I want to write a Persian paper some day does not mean that I want all my Microsoft Word menus to be Persian! That means that I just need an RTL/LTR switch which is there thanks to Microsoft!

Second, hard-coding a default directionality is not a good solution because non-English users may simply need to mix RTL and LTR stuff (For example LTR formula and RTL comments)

Sincerely,
Fadishei

fadishei commented Mar 6, 2013

First, I think this is an OK solution because most non-English users prefer to use an English environment (menus, etc) that lets them input non-English content and this can work in 3.1 branch with my patch. The fact that I want to write a Persian paper some day does not mean that I want all my Microsoft Word menus to be Persian! That means that I just need an RTL/LTR switch which is there thanks to Microsoft!

Second, hard-coding a default directionality is not a good solution because non-English users may simply need to mix RTL and LTR stuff (For example LTR formula and RTL comments)

Sincerely,
Fadishei

@dstillman

This comment has been minimized.

Show comment
Hide comment
@dstillman

dstillman Mar 6, 2013

Member

OK, just to be clear, I wasn't asking about your patch—I didn't use that directly. I was asking if the variation on your patch that I committed above, with a single toggle button and the default based on the current Firefox or Zotero locale, would work for you. I don't know any particular reason why it wouldn't, but you should try it out if you haven't yet. The hard-coding I was referring to was just a temporary thing that you'd need to do to test my patch in a non-English locale until the 3.1 branch is usable in non-English locales, which may not be for another day or two. You can also just wait for the 3.1 Beta, which will be out soon, and try it then.

Member

dstillman commented Mar 6, 2013

OK, just to be clear, I wasn't asking about your patch—I didn't use that directly. I was asking if the variation on your patch that I committed above, with a single toggle button and the default based on the current Firefox or Zotero locale, would work for you. I don't know any particular reason why it wouldn't, but you should try it out if you haven't yet. The hard-coding I was referring to was just a temporary thing that you'd need to do to test my patch in a non-English locale until the 3.1 branch is usable in non-English locales, which may not be for another day or two. You can also just wait for the 3.1 Beta, which will be out soon, and try it then.

@fadishei

This comment has been minimized.

Show comment
Hide comment
@fadishei

fadishei Mar 6, 2013

I'm sorry that I overlooked your commit and then misundrestood your comment. Using a single toggle button instead of two buttons is a good idea. I just tested your commit and it works perfectly for me!

fadishei commented Mar 6, 2013

I'm sorry that I overlooked your commit and then misundrestood your comment. Using a single toggle button instead of two buttons is a good idea. I just tested your commit and it works perfectly for me!

@dstillman

This comment has been minimized.

Show comment
Hide comment
@dstillman

dstillman Mar 6, 2013

Member

Great, thanks.

Member

dstillman commented Mar 6, 2013

Great, thanks.

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