----------------------------------------------------------------------------------
@MSGID:
<d9588b9c-edcc-4f8b-85d2-7487b5556798n@googlegroups.com> f2debf1b
@REPLY:
<db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com> 6340935c
@REPLYADDR Mild Shock <bursejan@gmail.com>
@REPLYTO 2:5075/128 Mild Shock
@CHRS: CP866 2
@RFC: 1 0
@RFC-References:
<db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
@RFC-Message-ID:
<d9588b9c-edcc-4f8b-85d2-7487b5556798n@googlegroups.com>
@TZUTC: -0700
@PID: G2/1.0
@TID: FIDOGATE-5.12-ge4e8b94
The new multilingual strings are also an exercise in
Novacore. There were a few issues that needed novel
Prolog solutions, to make a Novacore solution.
One problem was I didn`t want to use library(format)
and format/3 to format multilingual strings when
generating error messages. This addresses more
the later multilingual strings processing than the
multilingual strings store itself. So how resolve this
paradox? Here is my take, a mini format/3 boostraped
from the Dogelog Player specific atom_split/3:
% sys_inter_polate(+Stream, +Atom, +List)
sys_inter_polate(Stream, Template, Args) :-
atom_split(Template, `~`, [Head|Tail]),
put_atom(Stream, Head),
sys_zipper_output(Args, Tail, Stream).
% sys_zipper_output(+List, +List, +Stream)
sys_zipper_output([Arg|Args], [Head|Tail], Stream) :-
writeq(Stream, Arg),
put_atom(Stream, Head),
sys_zipper_output(Args, Tail, Stream).
sys_zipper_output([], [], _).
It only understands format specifier `~`, but is sufficient:
/* German Text */
strings(`syntax_error.singleton_var`, de, `Alleinstehende Variable(n) ~,
anonyme Variable(n) (_) benutzen.`).
/* English and Fallback Text */
strings(`syntax_error.singleton_var`, ``, `Singleton variable(s) ~, use
anonymous variable(s) (_).`).
LoL
--- G2/1.0
* Origin: usenet.network (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5058/104 5075/128
@PATH: 5075/128 5020/1042 4441