/
test.scm
executable file
·35 lines (31 loc) · 984 Bytes
/
test.scm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#! /usr/local/bin/guile \
-e main -L ../
!#
(use-modules (translates translate)(translates utils)(ice-9 rdelim))
;;(define f (open-file "./translates/examples/locale/zh/test.csv" "r"))
(define get-each-new-file
(lambda (handle)
(let ((lst '()))
(do ((line-data (read-line handle) (read-line handle)))
((eof-object? line-data))
(set! lst (cons (string-split line-data #\;) lst)))
lst)))
(define main
(lambda (args)
(set-translate "csv" "/home/wackOnline/guile-programming/translates/examples/locale/" "zh" '((delimiter . #\;)))
(display (get-adapter))
(newline)
(display (get-content))
(newline)
(display (get-locale))
(newline)
(display (get-options))
(newline)
(display (translate 'hello))
(newline)
(display (translate 'hello "en"))
;;(display (call-with-input-file "./translates/examples/locale/zh/test.csv" get-each-new-file))
;;(display (string-or-symbol "aa"))
;;(close f)
(newline)
))