GnuCash
Contact   Instructions
Bug 797935 - Strange formal register headers
Summary: Strange formal register headers
Status: VERIFIED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Register (show other bugs)
Version: 4.0
Hardware: PC All
: Normal normal
Target Milestone: ---
Assignee: ui
QA Contact: ui
URL:
Whiteboard:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2020-09-09 02:17 EDT by Heinz-Peter Heidinger
Modified: 2020-09-11 12:54 EDT (History)
4 users (show)

See Also:


Attachments
Wrong formal headers by LANG=de_DE.utf-8 gnucash (40.79 KB, image/png)
2020-09-09 07:15 EDT, Frank H. Ellenberger
no flags Details

Description Heinz-Peter Heidinger 2020-09-09 02:17:26 EDT
If the checkbox "Buchungsüberschriften aus Rechnungswesen" (tab "Konto" in the settings) is checkmarked English notions "Debit" & "Credit" are shown instead of the German notions "Soll" & "Haben"

This happens everywhere regardless whether I use GnuCash V4 from the distribution (Fedora), from FlatPak or compile the GitHub source code myself and run GnuCash V4 from /usr/local/...

I have checked the "gnucash.mo" file and the translations are in there, but the checkbox setting does not honor this and falls back to English.
Comment 1 Frank H. Ellenberger 2020-09-09 06:21:00 EDT
It is more weired: If you expand the columns the full headers are "Gesamt Debit" and "Gesamt Credit". I have no idea, from where the translated "Total" comes.

Why has it become "Tot Debit" and "Tot Credit", each with the first sybmol translated and the second not?
Comment 2 Frank H. Ellenberger 2020-09-09 07:15:38 EDT
Created attachment 373860 [details]
Wrong formal headers by LANG=de_DE.utf-8 gnucash
Comment 3 Frank H. Ellenberger 2020-09-09 21:31:40 EDT
Looking in gnucash/register/ledger-core/split-register-control.c there are 2 functions for each header column like
gnc_split_register_get_credit_label for split lines,
gnc_split_register_get_tcredit_label for transaction lines with prefix "Tot ".

Informal labels are fine: "[Gesamt ]{Einzahlung|Abhebung}", but formal labels are at least partial untranslated: "[Gesamt ]{Credit|Debit}" instead of "[Gesamt ]{Soll|Haben}".

Issue 1 in gnc_split_register_get_tdebit_label:
        const char* string = gnc_split_register_get_debit_string (reg);
        if (string)
            info->tcredit_str = g_strdup_printf (_ ("Tot %s"), string);
produces the mixed language string, while the branch
    info->tcredit_str = g_strdup (_ ("Tot Credit"));
is intended.

Issue 2:
In gnc_split_register_get_credit_label
    return gnc_split_register_get_credit_string (reg);
is untranslated. I don't know, where the translation was intended to happen.
Comment 4 Frank H. Ellenberger 2020-09-09 21:43:39 EDT
Oops, I just saw, I mixed credit and debit in Issue 1. Both functions are affected.
Comment 5 Frank H. Ellenberger 2020-09-09 21:45:00 EDT
... in both issues.
Comment 6 Bob 2020-09-11 09:57:16 EDT
Will have a look at this...
Comment 7 Bob 2020-09-11 10:29:22 EDT
Traced to some missing brackets around the dflt_acct_debit_str and deflt_acct_credit_str. Pushed to maint and will be in the next release 4.2

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