Commit Graph

17 Commits

Author SHA1 Message Date
Christopher Lam
2a392633ed Bug 798991 - Incorrect Account Name Order in Transaction Report
gnc:string-locale<? uses glib instead of guile string compare
2023-07-11 08:41:09 +08:00
Christopher Lam
645cc9461d [core-utils] modify gnc:format to accept -
this allows use of varnames such as ${report-title}
2023-01-17 00:24:08 +08:00
Christopher Lam
0bce6a1d56 [core-utils] introduce gnc:format
(gnc:format str [binding value]...)

str will contain ${binding} which will be replaced to value.
2021-10-09 10:25:53 +08:00
Christopher Lam
6df74eb94f [core-utils.scm] typo in guile: use-modules 2021-01-03 16:03:14 +08:00
Christopher Lam
6f9517845a [core-utils] use custom unbound-variable exception printer
When a guile coder uses a variable but omits use-modules, this code
will scan *all* available modules and offer the appropriate module
name.

Before:
Unbound variable: gnc-build-url

After:
Unbound variable: gnc-build-url. Did you forget (use-module (sw_gnc_html))?
2020-12-14 21:54:52 +08:00
Christopher Lam
c17ce5251c [modularise] (gnucash core-utils) 2020-12-09 06:39:51 +08:00
Christopher Lam
82d3bcd394 [core-utils] N_ is identity function
N_ is mapped to the identity function. Previously N_ was defined as a
macro, which is more tricky to export.
2020-12-04 21:33:01 +08:00
Christopher Lam
6d6eff6b70 Expose ngettext as gnc:ngettext 2020-11-02 22:24:05 +08:00
Christopher Lam
25e4efc2b7 [core-utils.scm][API] gnc:string-locale<? gnc:string-locale>?
locale-sensitive string-sorting functions -- currently mirrors guile's
(ice-9 i18n) functions -- may be modified to call C code if guile code
is not reliable.
2020-11-01 08:30:56 +08:00
Geert Janssens
dae2ea8356 Expose C_ function (gettext with context string) to guile code
First use is for the document link short code (L)
2020-09-17 22:20:02 +02:00
Christopher Lam
f35a26882d Addendnum to ad20f859c -- _ must be exported 2020-08-03 23:26:29 +08:00
Christopher Lam
ad20f859cc [core-utils] define _ for guile-2.2 2020-08-03 07:11:27 +08:00
Christopher Lam
428c8c501c [guile-3] change _ to G_
In guile-3 _ is a reserved symbol. Change to G_ by guile gettext
convention.
2020-07-12 19:03:26 +08:00
John Ralls
b5aeca94b6 Bug 797746 - [reports] German umlauts not escaped
Resume using libintl directly. Guile apparently passes gettext msgstrs
through scm_from_locale_string instead of scm_from_utf8_string.
2020-06-07 10:46:01 -07:00
Geert Janssens
d777128e6f app-utils - simplify and move gettext wrappers
1. Instead of creating a C wrapper around gettext to then wrap in
guile, use guile's builtin gettext support directly.

The code still defines the _ and N_ shorthands. However it doesn't
really warant a separate module just for these two shorthands.
Instead define them in core-utils. So all code wanting to use
_ or N_ in guile should now use the (gnucash core-utils) module.

The bulk of this commit is actually deleting the scm-gettext
target and using (gnucash core-utils) instead of (gnucash gettext).

2. As the definition of _ and N_ is removed from app-utils.scm,
the app-utils test for a functional N_ macro has been moved to a
new test file in the guile bindinds tests.

3. The (gnucash gettext) module has been deprecated. Use
(gnucash core-utils) from now on.
2019-12-06 19:59:12 +01:00
Geert Janssens
49bf27fad5 core-utils - use one command to export all swig wrapped symbols via the (gnucash core-utils) module 2019-12-06 19:59:11 +01:00
Geert Janssens
28fa4c6465 core-utils - move wrapper code to bindings/guile
Note core-utils.i is used by both the guile and the python bindings so
it is moved up to the common bindings directory, while guile
specific changes are in bindings/guile.
2019-12-06 19:59:11 +01:00