GnuCash
Contact   Instructions
Bug 797279 - Reports RTL do not support RTL
Summary: Reports RTL do not support RTL
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Reports (show other bugs)
Version: 3.5
Hardware: PC Linux
: Normal normal
Target Milestone: ---
Assignee: reports
QA Contact: reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-12 08:51 EDT by Avi Markovitz
Modified: 2020-04-18 09:27 EDT (History)
7 users (show)

See Also:


Attachments
Hebrew report headers showing Jibbrish (67.60 KB, image/png)
2019-06-12 08:51 EDT, Avi Markovitz
no flags Details
Income statement showing Gibberish header and not aligned RTL (90.71 KB, image/png)
2019-06-12 08:55 EDT, Avi Markovitz
no flags Details
v 3.6, reprt and main window showing Gibberish headers and not aligned RTL (187.66 KB, image/png)
2019-08-15 02:20 EDT, Avi Markovitz
no flags Details
aligned vendor aging report w/ gibbrish (149.69 KB, image/png)
2019-08-15 03:10 EDT, Avi Markovitz
no flags Details
no issue here (36.52 KB, image/png)
2019-08-15 03:37 EDT, Christopher Lam
no flags Details
b4 (190.44 KB, image/png)
2019-08-15 03:56 EDT, Avi Markovitz
no flags Details
after (111.83 KB, image/png)
2019-08-15 04:00 EDT, Avi Markovitz
no flags Details
after re launching the repoert (135.13 KB, image/png)
2019-08-15 04:02 EDT, Avi Markovitz
no flags Details
needs to be Align to the right (186.13 KB, image/png)
2019-08-15 08:31 EDT, Avi Markovitz
no flags Details
Bill (115.01 KB, image/png)
2019-08-18 11:57 EDT, Avi Markovitz
no flags Details
Eguil Bakance Sheet (111.78 KB, image/png)
2019-08-18 11:58 EDT, Avi Markovitz
no flags Details
Charts Legends (95.71 KB, image/png)
2019-08-18 11:59 EDT, Avi Markovitz
no flags Details
Journal (193.92 KB, image/png)
2019-08-18 12:00 EDT, Avi Markovitz
no flags Details
New beta reports (234.32 KB, image/png)
2019-11-26 10:34 EST, Avi Markovitz
no flags Details
New beta reports with annotations (293.90 KB, image/png)
2019-12-08 09:41 EST, Avi Markovitz
no flags Details

Description Avi Markovitz 2019-06-12 08:51:04 EDT
Created attachment 373298 [details]
Hebrew report headers showing Jibbrish

Hi,

I'm currently working on translating Gnucash GUI to Hebrew (Hebrew is RTL). During testing my translation, I noticed that the Reports do not support RTL while the GUI itself does. Meaning the whole page should have been RTL oriented.

Also it seems that the reports do not retrieve the Hebrew strings from the report settings hence the are showing jibrish headings or completely broken.  

My Regards
Avi
Comment 1 Avi Markovitz 2019-06-12 08:55:33 EDT
Created attachment 373299 [details]
Income statement showing Gibberish header and not aligned RTL
Comment 2 Frank H. Ellenberger 2019-08-14 17:25:21 EDT
Avi, can you update to 3.6, try a nightly
https://code.gnucash.org/builds/flatpak/maint/?C=M;O=D
or build gnucash yourself. I believe, a few UTF issues are already fixed.
Comment 3 John Ralls 2019-08-14 20:52:28 EDT
The rtl fix should be easy, we just need to detect an rtl language and add the dir="rtl" attribute to the <html> tag at the top of the report.
Comment 4 Avi Markovitz 2019-08-15 02:20:00 EDT
Created attachment 373347 [details]
v 3.6, reprt and main window  showing Gibberish headers and not aligned RTL
Comment 5 Christopher Lam 2019-08-15 02:23:10 EDT
@Avi - Would you mind modify html-document.scm and retry? We can figure out autodetect later on...

modified   gnucash/report/report-system/html-document.scm
@@ -150,7 +150,7 @@
             ;;./share/gnucash/scm/gnucash/report/taxinvoice.eguile.scm:<html>
             ;;./share/gnucash/scm/gnucash/report/balsheet-eg.eguile.scm:<html>
 
-            (push "<html>\n")
+            (push "<html dir='rtl'>\n")
             (push "<head>\n")
             (push "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n")
             (if style-text
Comment 6 Avi Markovitz 2019-08-15 02:28:03 EDT
Actually, I built 3.6 from the source a few days ago hoping this will go away but unfortunately it is still there... :)

Here is a list of the main languages that use right to left scripts:

    Arabic
    Aramaic
    Azeri
    Dhivehi/Maldivian
    Hebrew
    Kurdish (Sorani)
    Persian/Farsi
    Urdu
Comment 7 Christopher Lam 2019-08-15 02:40:35 EDT
PS alternatively "<html dir='auto'>\n" *may* be better...
Comment 8 Avi Markovitz 2019-08-15 03:07:46 EDT
hum... that partially took care of alleging the report direction to the right, but not text (account names) and not the gibberish (see attached screen caption)
Comment 9 Avi Markovitz 2019-08-15 03:10:05 EDT
Created attachment 373348 [details]
aligned vendor aging report w/ gibbrish
Comment 10 Avi Markovitz 2019-08-15 03:17:50 EDT
 I did not notice any difference between "<html dir='auto'>\n" and  "<html dir='rtl'>\n"...
Comment 11 Christopher Lam 2019-08-15 03:23:38 EDT
Ok sounds like rtl can be fixed; the gibberish looks like a guile string issue. Please send: exact locale, .html generated in /tmp, guile version...
Comment 12 Christopher Lam 2019-08-15 03:37:27 EDT
Created attachment 373349 [details]
no issue here

Can't reproduce from my end. Try setting Report Options, screenshot, click reset options, screenshot?
Comment 13 Avi Markovitz 2019-08-15 03:41:43 EDT
one more thing, it only affects some reports not all, trial balance, balance sheet, and some others are still aligned to the left.
Comment 14 Avi Markovitz 2019-08-15 03:56:57 EDT
Created attachment 373350 [details]
b4
Comment 15 Avi Markovitz 2019-08-15 04:00:17 EDT
Created attachment 373351 [details]
after

resetting fixes the problem temporarily until exiting the report. After relaunching, Gibberish is back too..
Comment 16 Avi Markovitz 2019-08-15 04:02:07 EDT
Created attachment 373352 [details]
after re launching the repoert
Comment 17 Christopher Lam 2019-08-15 04:07:41 EDT
sounds like a different form of bug 796754 -- we'd really need datasheets.

guile version
exact OS version
exact build parameters
version of dependencies
Comment 18 Christopher Lam 2019-08-15 04:13:35 EDT
oh btw if you can upgrade your macOS guile to 2.2 it *should* fix gibberish
Comment 19 Christopher Lam 2019-08-15 04:15:02 EDT
erratum- no idea why I thought you were using MacOS. Linux upgrade to 2.2 should fix. If I'm right, we'll need to consider how to fix this for users on guile-2.0
Comment 20 Avi Markovitz 2019-08-15 08:31:36 EDT
Created attachment 373356 [details]
needs to be Align to the right

Yupe looks like guil 2.2 did the job... gibberish is gone, the only other issue is to make sure all reports, title, and texts are aligned to the right
Comment 21 Christopher Lam 2019-08-15 08:35:35 EDT
Good.

It will *really* help to identify how to fix html. None of the regular devs use RTL. Perhaps File>Export>Report .html, amend in editor, and document how to fix to your suggestions?
Comment 22 Christopher Lam 2019-08-15 09:53:26 EDT
Try the following patch, basically removing text-align:left in default styles:

modified   gnucash/report/report-system/html-fonts.scm
@@ -140,7 +140,7 @@
             (string-append
                 "h3 { " title-font-info " }\n"
                 "a { " account-link-font-info " }\n"
-                "body, p, table, tr, td { text-align: left; vertical-align: top; " text-cell-font-info " }\n"
+                "body, p, table, tr, td { vertical-align: top; " text-cell-font-info " }\n"
                 "tr.alternate-row { background: " alternate-row-color " }\n"
                 "tr { page-break-inside: avoid !important;}\n"
                 "th.column-heading-left { text-align: left; " number-header-font-info " }\n"
Comment 23 Avi Markovitz 2019-08-15 11:30:42 EDT
Thanks Christopher, that took care of most of the reports but some still not aligning to the right; balance sheet, income statement, trial balance, equity statement... probably some more (i can go through all of them if it helps)
Comment 24 Avi Markovitz 2019-08-15 11:38:45 EDT
...and forgot to mention the journals, of course, they too need to right-aligned
Comment 25 Christopher Lam 2019-08-15 11:59:37 EDT
I think some will remain LTR because the document-title is a mixture RTL and LTR. dir=auto doesn't seem to autodetect RTL if that's the case. eguile reports won't detect RTL either. 

This is a *hard* problem, solved via complex code. See: ICU BiDi, Harfbuzz.
Comment 26 Avi Markovitz 2019-08-15 12:25:39 EDT
fair enough, the gibberish was my main concern...
Comment 27 John Ralls 2019-08-15 13:05:57 EDT
(In reply to Christopher Lam from comment #18)
> oh btw if you can upgrade your macOS guile to 2.2 it *should* fix gibberish

Chris, except in the rare case of a MacPorts user, MacOS users use an all-in-one bundle  with all of the dependencies provided. It's provided Guile 2.2 since GnuCash 3.2.
Comment 28 John Ralls 2019-08-15 13:17:24 EDT
(In reply to Christopher Lam from comment #25)
> I think some will remain LTR because the document-title is a mixture RTL and
> LTR. dir=auto doesn't seem to autodetect RTL if that's the case. eguile
> reports won't detect RTL either. 
> 
> This is a *hard* problem, solved via complex code. See: ICU BiDi, Harfbuzz.

Harfbuzz is about glyph shaping. FriBiDi (https://github.com/fribidi/fribidi) is the non-icu implementation that Gnome uses.

Not that it matters, neither ICU nor FriBiDi will help with HTML where the (embedded) browser is responsible for rendering the text. https://www.w3.org/International/articles/inline-bidi-markup/ has some recommendations for HTML, but it's naturally oriented more towards PHP than Scheme or C.
Comment 29 Christopher Lam 2019-08-15 20:52:17 EDT
So, many aspects to this bug

1. gibberish fixed by upgrading to guile-2.2. but guile-2.0 is still supported. this suggests we'd need to add the MarkWeaver's monkeypatch, eg. in utilities.scm

2. dir=auto may be added to top <html>

3. some reports fail the bidi autodetect, I think because the report-title amalgamates companyname+reportname; could be amended so that a localised reportname is rendered in its own <span> therefore triggers the RTL autodetect. but this is a brittle. alternatively try find locale->rtl (which doesn't seem to exist) and enforce <html dir=rtl> if this is true.
Comment 30 Christopher Lam 2019-08-15 23:03:28 EDT
@Avi it would be of great help to temporarily downgrade guile to 2.0, check out my branch https://github.com/christopherlam/gnucash/tree/maint and retry; it incorporates both html dir=auto and the strings fix. We can then consider these matters closed and move on to try fixing other reports.
Comment 31 Avi Markovitz 2019-08-16 04:37:51 EDT
Here's what I did:
-Uninstalled gnucash-3.6
-Downgraded guile to 2.0
-Checked out your branch from git
-Ran make and got the following error:

"Scanning dependencies of target gnc-module
make[2]: *** No rule to make target 'libgnucash/gnc-module/CMakeFiles/gnc-module.dir/build'.  Stop.
CMakeFiles/Makefile2:6069: recipe for target 'libgnucash/gnc-module/CMakeFiles/gnc-module.dir/all' failed
make[1]: *** [libgnucash/gnc-module/CMakeFiles/gnc-module.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
avi@avi-PC-Mint19:~/git/gnucash-maint/build-gnucash-maint$"

Any idea
Comment 32 Avi Markovitz 2019-08-16 04:43:28 EDT
line 4, I ran cmake...
Comment 33 Christopher Lam 2019-08-16 04:57:43 EDT
Should have exact same dependencies as v3.6, plus/minus a smidge; try follow https://wiki.gnucash.org/wiki/Building_On_Linux exactly
Comment 34 Avi Markovitz 2019-08-16 05:06:41 EDT
cmake resulted in these errors:

CMake Error: CMake can not determine linker language for target: test-core-guile
CMake Error: Cannot determine link language for target "test-core-guile".
CMake Error: CMake can not determine linker language for target: gncmod-app-utils
CMake Error: Cannot determine link language for target "gncmod-app-utils".
CMake Error: CMake can not determine linker language for target: gnc-core-utils
CMake Error: Cannot determine link language for target "gnc-core-utils".
CMake Error: CMake can not determine linker language for target: gncmod-engine
CMake Error: Cannot determine link language for target "gncmod-engine".
CMake Error: CMake can not determine linker language for target: gnc-module
CMake Error: Cannot determine link language for target "gnc-module".
CMake Error: CMake can not determine linker language for target: gnc-gnome
CMake Error: Cannot determine link language for target "gnc-gnome".
CMake Error: CMake can not determine linker language for target: gncmod-gnome-utils
CMake Error: Cannot determine link language for target "gncmod-gnome-utils".
CMake Error: CMake can not determine linker language for target: gncmod-html
CMake Error: Cannot determine link language for target "gncmod-html".
CMake Error: CMake can not determine linker language for target: gncmod-report-gnome
CMake Error: Cannot determine link language for target "gncmod-report-gnome".
CMake Error: CMake can not determine linker language for target: gncmod-report-system
CMake Error: Cannot determine link language for target "gncmod-report-system".
-- Generating done
-- Build files have been written to: /home/avi/git/gnucash-maint/build-gnucash-maint
avi@avi-PC-Mint19:~/git/gnucash-maint/build-gnucash-maint$
Comment 35 Avi Markovitz 2019-08-16 05:38:33 EDT
I've got them all yet still cmake ends with errors...
Comment 36 Avi Markovitz 2019-08-16 05:41:11 EDT
I'm gonna give it a go on my Dell LP, it has less stuff piled up on it
Comment 37 Avi Markovitz 2019-08-16 07:36:57 EDT
Same errors on my LP...

CMake Error at common/test-core/CMakeLists.txt:43 (add_library):
  Cannot find source file:

    /home/avi/git/gnucash-maint/common/test-core/swig-unittest-support-guile.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx


CMake Error at libgnucash/app-utils/CMakeLists.txt:94 (add_library):
  Cannot find source file:

    /home/avi/git/gnucash-maint/libgnucash/app-utils/swig-app-utils-guile.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx


CMake Error at libgnucash/core-utils/CMakeLists.txt:130 (add_library):
  Cannot find source file:

    /home/avi/git/gnucash-maint/libgnucash/core-utils/swig-core-utils-guile.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx


CMake Error at libgnucash/engine/CMakeLists.txt:225 (add_library):
  Cannot find source file:

    /home/avi/git/gnucash-maint/libgnucash/engine/swig-engine.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx


CMake Error at libgnucash/gnc-module/CMakeLists.txt:21 (add_library):
  Cannot find source file:

    /home/avi/git/gnucash-maint/libgnucash/gnc-module/swig-gnc-module.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx


CMake Error at gnucash/gnome/CMakeLists.txt:126 (add_library):
  Cannot find source file:

    /home/avi/git/gnucash-maint/gnucash/gnome/swig-gnome.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx


CMake Error at gnucash/gnome-utils/CMakeLists.txt:206 (add_library):
  Cannot find source file:

    /home/avi/git/gnucash-maint/gnucash/gnome-utils/swig-gnome-utils.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx


CMake Error at gnucash/html/CMakeLists.txt:37 (add_library):
  Cannot find source file:

    /home/avi/git/gnucash-maint/gnucash/html/swig-gnc-html.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx


CMake Error at gnucash/report/report-gnome/CMakeLists.txt:26 (add_library):
  Cannot find source file:

    /home/avi/git/gnucash-maint/gnucash/report/report-gnome/swig-report-gnome.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx


CMake Error at gnucash/report/report-system/CMakeLists.txt:18 (add_library):
  Cannot find source file:

    /home/avi/git/gnucash-maint/gnucash/report/report-system/swig-report-system.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx


CMake Error: CMake can not determine linker language for target: test-core-guile
CMake Error: Cannot determine link language for target "test-core-guile".
CMake Error: CMake can not determine linker language for target: gncmod-app-utils
CMake Error: Cannot determine link language for target "gncmod-app-utils".
CMake Error: CMake can not determine linker language for target: gnc-core-utils
CMake Error: Cannot determine link language for target "gnc-core-utils".
CMake Error: CMake can not determine linker language for target: gncmod-engine
CMake Error: Cannot determine link language for target "gncmod-engine".
CMake Error: CMake can not determine linker language for target: gnc-module
CMake Error: Cannot determine link language for target "gnc-module".
CMake Error: CMake can not determine linker language for target: gnc-gnome
CMake Error: Cannot determine link language for target "gnc-gnome".
CMake Error: CMake can not determine linker language for target: gncmod-gnome-utils
CMake Error: Cannot determine link language for target "gncmod-gnome-utils".
CMake Error: CMake can not determine linker language for target: gncmod-html
CMake Error: Cannot determine link language for target "gncmod-html".
CMake Error: CMake can not determine linker language for target: gncmod-report-gnome
CMake Error: Cannot determine link language for target "gncmod-report-gnome".
CMake Error: CMake can not determine linker language for target: gncmod-report-system
CMake Error: Cannot determine link language for target "gncmod-report-system".
-- Generating done
-- Build files have been written to: /home/avi/git/gnucash-maint/build-gnucash-maint
avi@avi-Latitude-E7470:~/git/gnucash-maint/build-gnucash-maint$
Comment 38 Christopher Lam 2019-08-16 08:22:39 EDT
I think something must have gone wrong in setting up the source code dir.

If you built 3.6 (or later) from source (not flatpak) obtained via
$git clone https://github.com/Gnucash/gnucash.git

then you could
$git remote add chris https://github.com/christopherlam/gnucash.git
$git checkout chris/maint

etc.

If via flatpak then I'm sorry I can't generate it. Someone else may be able to assist.
Comment 39 Geert Janssens 2019-08-16 08:33:56 EDT
Do you have swig installed ? It's a mandatory dependency when building from git.

Can you post your full cmake output (when run in an empty build directory) ?
Comment 40 Avi Markovitz 2019-08-16 08:52:55 EDT
swig and all other dependencies are there, I was able to rebuild and install 3.6 smoothly without any problems. So this is probably something to do with getting the repo from git. let me try what Christopher suggested and see how goes it.
Comment 41 Avi Markovitz 2019-08-16 09:13:37 EDT
ok that was it, make is running now...
Comment 42 Avi Markovitz 2019-08-16 09:17:30 EDT
or not :( failed again with:

Backtrace:
In ice-9/eval-string.scm:
  44: 19 [read-and-eval #<input: string 55f706ce9d00> #:lang ...]
  37: 18 [lp (use-modules (gnucash engine))]
In ice-9/eval.scm:
 505: 17 [#<procedure 55f7066174e0 at ice-9/eval.scm:499:4 (exp)> (use-modules #)]
In ice-9/psyntax.scm:
1106: 16 [expand-top-sequence ((use-modules (gnucash engine))) () ...]
 989: 15 [scan ((use-modules (gnucash engine))) () ...]
 279: 14 [scan ((# #) #(syntax-object *unspecified* # #)) () (()) ...]
In ice-9/boot-9.scm:
3589: 13 [process-use-modules (((gnucash engine)))]
 705: 12 [map #<procedure 55f7066d6d60 at ice-9/boot-9.scm:3589:25 (mif-args)> ((#))]
3590: 11 [#<procedure 55f7066d6d60 at ice-9/boot-9.scm:3589:25 (mif-args)> (#)]
2867: 10 [resolve-interface (gnucash engine) #:select ...]
2792: 9 [#<procedure 55f7066c9640 at ice-9/boot-9.scm:2780:4 (name #:optional autoload version #:key ensure)> # ...]
3068: 8 [try-module-autoload (gnucash engine) #f]
2404: 7 [save-module-excursion #<procedure 55f706e38ba0 at ice-9/boot-9.scm:3069:17 ()>]
3088: 6 [#<procedure 55f706e38ba0 at ice-9/boot-9.scm:3069:17 ()>]
In unknown file:
   ?: 5 [primitive-load-path "gnucash/engine" ...]
In engine.scm:
 118: 4 [#<procedure 55f706e68ce0 ()>]
In ice-9/boot-9.scm:
1727: 3 [%start-stack load-stack ...]
1732: 2 [#<procedure 55f706d08990 ()>]
In unknown file:
   ?: 1 [primitive-load-path "gnucash/engine/gnc-numeric"]
In ice-9/boot-9.scm:
 109: 0 [#<procedure 55f706a7cbc0 at ice-9/boot-9.scm:100:6 (thrown-k . args)> misc-error ...]

ice-9/boot-9.scm:109:20: In procedure #<procedure 55f706a7cbc0 at ice-9/boot-9.scm:100:6 (thrown-k . args)>:
ice-9/boot-9.scm:109:20: In procedure primitive-load-path: Unable to find file "gnucash/engine/gnc-numeric" in load path
libgnucash/engine/CMakeFiles/scm-engine-1.dir/build.make:80: recipe for target 'lib/x86_64-linux-gnu/guile/2.0/site-ccache/gnucash/engine/engine-utilities.go' failed
make[2]: *** [lib/x86_64-linux-gnu/guile/2.0/site-ccache/gnucash/engine/engine-utilities.go] Error 1
CMakeFiles/Makefile2:5060: recipe for target 'libgnucash/engine/CMakeFiles/scm-engine-1.dir/all' failed
make[1]: *** [libgnucash/engine/CMakeFiles/scm-engine-1.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
Comment 43 Avi Markovitz 2019-08-17 03:54:06 EDT
This might not be helpful at all but since I was unable to build from your repo, as a workaround, I manually copied and paste the raw code from the three files in your repo; html-fonts.scm,  html-document.scm and utilities.scm into the gnucash-maint repo and built from that (which ended Successfully).

With this installation, gnucash runs fine but the whole thing is left-aligned; main menu, tabs, reports (a few reports still aligns to the right).

Again, I'm not sure that with this workaround, this even means anything...
Comment 44 Christopher Lam 2019-08-17 06:38:23 EDT
I can't see how my .scm changes would modify the whole application RTL. Perhaps try reset to the main repository and try rebuild. Then try copy the .scm files again.
Comment 45 John Ralls 2019-08-17 12:05:57 EDT
Remember, scheme is interpreted. You can copy the modified files into /usr/share/share/guile/site/2.2/gnucash/report and run GnuCash.

As Chris says, this change won't affect the GUI, just the HTML display of the report itself. Note that with dir='auto' the text direction is determined by the characters in the title, so you may need to edit it in report options to make sure that it's all Hebrew in order to get an RTL report.

Can you say which reports display RTL and which LTR, the latter in particular if it's even with an all-Hebrew title?
Comment 46 Avi Markovitz 2019-08-17 12:27:53 EDT
Copying the .scm to a clean build worked! So now it looks like all reports are right-aligned other than the Journals and eguile which was expected.
Comment 47 Christopher Lam 2019-08-18 01:39:58 EDT
Ok I've replicated the <html dir='auto'> to the eguile reports in the following branch.

https://github.com/christopherlam/gnucash/tree/maint-797279

I have also enabled translation for the general-ledger.

Please let me know if any other reports are not rtl properly.
Comment 48 Avi Markovitz 2019-08-18 11:57:56 EDT
Created attachment 373359 [details]
Bill

Hi Christopher,

Looks like you got most of them but a few: Bill, Charts legends, text-align in the eguils and the journal is still LTR. I'm attaching some screenshots
Comment 49 Avi Markovitz 2019-08-18 11:58:49 EDT
Created attachment 373360 [details]
Eguil Bakance Sheet
Comment 50 Avi Markovitz 2019-08-18 11:59:22 EDT
Created attachment 373361 [details]
Charts Legends
Comment 51 Avi Markovitz 2019-08-18 12:00:02 EDT
Created attachment 373362 [details]
Journal
Comment 52 Christopher Lam 2019-08-18 12:20:30 EDT
Ok the only one I'd fix now is the balance sheet (eguile). Others are UI (not my area) and charts (big changes imminent).

Recheck my branch, CSS for balsheet-eg.css amended.
Comment 53 Avi Markovitz 2019-08-18 13:05:05 EDT
Great, many thanks Chris
Comment 54 Avi Markovitz 2019-08-18 13:25:47 EDT
balsheet-eg.css too looks good now!
Comment 55 Christopher Lam 2019-08-18 21:53:53 EDT
Ok I will merge these fixes tonight. I presume these fixes are confirmed with guile-2.0. Please continue filing RTL bugs as they appear... however I cannot help for non-reports ones.
Comment 56 Avi Markovitz 2019-08-19 02:59:55 EDT
Sure, thanks a lot Chris...
Comment 57 Christopher Lam 2019-08-19 09:07:17 EDT
Merged. Now maint has all changes already discussed. Further RTL issues please file new bugs. I know the register ("Journal" above) code is very difficult to understand, so, may not be fixable.
Comment 58 Avi Markovitz 2019-11-26 08:26:12 EST
Hi Chris,

Just a remainder that all new (beta) reports also need to right align...
-Customer
-Employee
-Job
-Vendor
-Payable
-Receivable
Comment 59 Christopher Lam 2019-11-26 09:25:02 EST
Where are your famous screenshots? :)
Comment 60 Avi Markovitz 2019-11-26 10:34:38 EST
Created attachment 373465 [details]
New beta reports

here you go...
Comment 61 Avi Markovitz 2019-11-26 10:36:26 EST
More than happy to add some, as lon they will not charge me for eating up all their storage space... ;)
Comment 62 Christopher Lam 2019-11-26 20:18:00 EST
Well the point of screenshots is to know which part exactly should be RTL...
Comment 63 Christopher Lam 2019-12-07 23:42:24 EST
Ping. Unless I have screenshot describing RTL components, I will not fix.
Comment 64 Avi Markovitz 2019-12-08 02:02:34 EST
I did add one Chris, see my pose above, dated 2019-11-26 10:34:38 EST
Comment 65 Christopher Lam 2019-12-08 06:07:00 EST
But there's no handwritten drawing describing which parts need to be RTL.
Comment 66 Avi Markovitz 2019-12-08 09:41:18 EST
Created attachment 373478 [details]
New beta reports with annotations
Comment 67 Avi Markovitz 2019-12-08 09:43:42 EST
Basically everything on the displayed report window needs to be RTL.
Comment 68 Christopher Lam 2019-12-08 10:13:24 EST
Did you *also* mean the column headers and contents? All of them?
Comment 69 Avi Markovitz 2019-12-08 10:47:30 EST
Yes, That is correct, Just as you fixed all other reports a couple of months back
Comment 70 Christopher Lam 2019-12-09 06:32:52 EST
I've pushed a fix.
It would seem RTL autodetect relies on the <title> tag being RTL. So, when "Receivable Aging (beta)" is translated, the aging report should be RTL.
Comment 71 Christopher Lam 2019-12-09 09:07:41 EST
As an alternative to translating these report names, perhaps it may be best to use reuse existing report names, and we only need to translate "(beta)" instead. Agreed?
Comment 72 Frank H. Ellenberger 2019-12-09 09:44:09 EST
(In reply to Christopher Lam from comment #71)
> As an alternative to translating these report names, perhaps it may be best
> to use reuse existing report names, and we only need to translate "(beta)"
> instead. Agreed?

That should be "%s (beta)" in C notation, so translators can adjust the format.
Apparently it needs a translator comment:
This string is used to mark beta versions of reports, where %s is the report name.
Comment 73 Avi Markovitz 2019-12-09 11:05:00 EST
I already translated the report titles altogether with some other stuff from the updated POT file and will push the he.po file soon.
Comment 74 Christopher Lam 2019-12-09 21:10:22 EST
https://www.w3.org/International/questions/qa-html-dir#dirauto states the first Strongly-typed char sets the RTL autodetect. Hence the report-title fix in https://github.com/Gnucash/gnucash/commit/60765e388ac69c4ae95223562de1108bc1a9f43e is an adequate fix for the new-owner-reports.

new-aging reports are not yet fixed -- addition of more i18n strings is one approach, or you can modify the reportname to hebrew in options, or I can modify report code to reuse existing strings.
Comment 75 Avi Markovitz 2020-04-18 08:59:00 EDT
This is not happening in 3.10 any more, so i guess it is ok to close this one?
Comment 76 Geert Janssens 2020-04-18 09:27:48 EDT
Yes, thanks a lot for reporting back.

Note You need to log in before you can comment on or make changes to this bug.