Project

General

Profile

Actions

Feature #11784

closed

{direction:rtl} doesn't work in text formatting

Added by Mahmood Jalilnejad about 12 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
I18n
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Duplicate

Description

I need to write wiki/issue text in Right-to-Left languages
searching issue list , I found that "{background:color}" is added 7 months ago (revision r8860 , feature #2416)
Now , I need it to write {direction:rtl;text-align:right} or p{direction:rtl}>. like what is possible in the Qt Wiki Textile format

I am not an RoR developer, otherwise I might fix it myself


Related issues

Is duplicate of Redmine - Feature #8121: Allow overriding direction of part of textClosedJean-Philippe Lang2011-04-10

Actions
Actions #1

Updated by Boaz Rymland over 11 years ago

+1. I'd be happy to see this implemented. RTL is very basic these days... . Thanks.

Actions #2

Updated by Toshi MARUYAMA over 11 years ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

Duplicate with #8121.

Actions #3

Updated by Ali Nadalizadeh almost 10 years ago

Temporary fix for persian users which converts the whole wiki paragraph to RTL (once detects persian/arabic content):

<script>
$(document).ready(function() {

$.each($(".wiki, .wiki-edit"), function(i,v){
    var txt = $(v).text();
    for(ci in txt) {
        if (txt.charCodeAt(ci) > 0x600 && txt.charCodeAt(ci) < 0x700) {
            $(v).css("direction", "rtl");
            break;
        }
    }
});

$.each($(".issue .subject a"), function(i,v){
    var txt = $(v).text();
    console.log(txt);
    for(ci in txt) {
        if (txt.charCodeAt(ci) > 0x600 && txt.charCodeAt(ci) < 0x700) {
            $(v).parent().css("direction", "rtl");
            $(v).parent().css("text-align", "right");
            break;
        }
    }
});

});
</script>

Append the code above to the main layout file (app/views/layouts/base.html.erb) or any other javascript file which is included in all pages.

Actions

Also available in: Atom PDF