We do no longer see overlapping texts in the reports. A great step forward.
There are small differences in the RTL PDF and the HTML reports, but most of the RTL texts are still ltr instead of rtl.
The HTML reports seem to print the RTL texts fully ltr and the dates DD MMMM YYYY instead of YYYY MMMM DD on the RTL reports. The PDF Marriage Date and Place Report columns are printed in ltr sequence.
The PDF Marriage Date and Place Report prints also the RTL texts ltr. The columns are in correct rtl sequence.
In page n of m, the word sequence is correct, but each word text is ltr and not rtl.
Date are DD MMMM YYYY.
RTL texts on LTR pages are also LTR and the unknown and other () are wrong in the HTML report.
The PDF report prints the RTL () as )( and the word sequence seems OK, but the letters of each word are LTR.
The RTL places on the individual report are with ltr word sequence, the names in rtl word sequence with ltr letter sequence for each word.
Why do we print the ;-s at least in the individual report for instance for "1 PHON +972-3-5330030"?
Could we work together to correct the RTL reports?
I do not know how to correct by myself the problems.
I would try to start with one report and make sure that it's LTR and RTL texts show and prints as expected in LTR and RTL pages.
I would then move to the next one ...
Meliza
Also the RTL HTML report title and the tab title are printed LTR.
In RTL reports in which the names are shortened (pedigrees) we should shorten the Latin name and print the full RTL name.
In the RTL changes report I see the source titles rtl in the pending changes. The other RTL texts are printed ltr.
The titles are: Abbreviation, Author, Note, Publication, Repository, Note, Text
Why are these titles printed without any data following them?
After the changes are approved and the change date is today's date, we no longer see the Source in the report.
I tried to add the bidi_text() function to the $name and $addname in class_reportbase.php.
The HTML names are OK.
The RTL names in the PDF report are printed in ltr word sequence and each word with correct letter sequence.
Meliza
The reports are a great improvement. Just to add to Meliza's comments about RTL on LTR pages. This issue happens on an English site when the site is configured to use Hebrew dates, or dual Hebrew Gregorian dates.
I have corrected some issues on my test system.
I will ask for help after I solve what I manage to solve with my trial and error approach.
Meliza
Hi Meliza!
Thanks for your efforts with RTL! It is well needed...
What changes are you making exactly?
I assume it's the
PGVRGetPersonNameSHandler::$name
PGVRGetPersonNameSHandler::$addname
This would only affect the names, right?
Are all the reports working with both LTR and RTL? At leas the HTML?
Cheers,
-Im
Meliza,
Could you please test something for me?
file: class_reportbase.php
class PGVRElement
and in the function addText($t)
Comment out a few line, exactly like this.
/* if ($embed_fonts) {
$t = bidi_text($t);
}
*/
This is only for test to see if RTL TEXT gets corrected!
For me, it "looks better"
So far I have added bidi_text() in class_reportbase.php to PGVRGetPersonNameSHandler() Private name, and the $names, PGVRGedcomValueSHandler() $values, PGVRvarSHandler() $var.
It seems that I managed to correct the ()-s by commenting out in functions_rtl.php bidi_text() the //-- loop through and c...
The trailer and the bottom report are not yet OK. I do not know how to add there the bidi_text(). Can you help?
Dates with for instance FROM TO are not yet OK. Need to look at them more thoroughly.
PDF reports print Hebrew texts with LTR word sequence; HTML is OK.
Some LTR texts are printed in RTL sequence on the RTL PDF reports.
The Hebrew HTML columns are in LTR sequence.
Can you think of the reason to this?
I will continue with changes and testing of RTL and LTR texts and pages both in PDF and HTML.
Do you know how I can debug the report texts?
Meliza
I already made this in 2 places and intended to test it.
Meliza
Hi Meliza,
Please, make a copy of all files where you have made any changes and move them somewhere else. Use the SVN original files and test that "comment out" thing.
The reason is, that ALL text has to pass this code. So this would be "one change in one place"
Just by this test, I see that everything is changing! PDF, HTML, all reports, well, all text.
I just can't read it to see if it's correct.
I'm pretty confident the this single 'change' will fix all your problem, at once :)
Columns:
The HTML is using absolute positions. Which is why the columns want "switch" to RTL.
The changes is some serious rewrite. I'm sure that it will be fixed to in the near future :)
But first, let's get the correct text to work properly and squash some bugs :)
OK, made the changes to the SVN file and restored the functions_rtl.
Headers, titles, dield titles, dates and data still in wrong letter sequence.
The trailer is still in wrong sequence.
The space between the name and the birth-death is still missing.
() are not printed correctly.
RTL Pedigree reports print the Latin name fully and the RTL name only as initials. Full stops are in wrong places and " is printed for nick-names.
etc.
Sorry!!!
I did not remove the bidi_text line.
Now it looks better.
Even the trailer data is OK.
Give me some time to retest.
The latest SVN fixed the reversed Hebrew date rendering (that had totally rendered LTR), but using Hebrew or the dual Hebrew Gregorian dates on an RTL report renders fine in HTML, but in PDF, instead of displaying day month, year, it displays year, month and date.
The PDF reports print on LTR (English, ...) pages RTL (Hebrew...) texts like names or Hebrew or Hebrew/Gregorian calendar format dates in LTR word sequence. The RTL (Hebrew ...) pages print LTR (English ...) texts in RTL word sequence. This includes on my site for instance places in the Ahnentafel report.
The reports do not print correctly.
Address labels and lists are not returned when one filters on the text of the address.
Birth, Death, Marriage report does print any individual who has any fact that took place in the filtered place. No filtering is done on the Marriage data.
I have created a help thread to tcpdf for the PDF word sequence.
https://sourceforge.net/forum/message.php?msg_id=7522813
The answer that I got is:
To mix RTL and LTR, I suggest to use directional font codes or using HTML span tag with dir attribute:
<span dir="rtl"> ... </span>
Check the default example n.6 for further information.
It seems that we need a function that will add the attributes around LTR texts and RTL texts that are sent to PDF.
I will try to test this.
Meliza