i18n / srfi-29

55 views
Skip to first unread message

Roman Klochkov

unread,
Jul 22, 2019, 6:56:13 AM7/22/19
to Racket Users
Hello!

I'm trying to use srfi/29. As far as I understand, it provide declare-bundle! + store-bundle to make a localization and load-bundle! to use it.
But I cannot find, how to use raco pkg install to run declare-bundle! + store-bundle. Or is there any other way to run post-install command in Racket?

P.S. Why DrRacket doesn't use srfi/29?

Roman Klochkov

unread,
Jul 23, 2019, 2:52:56 AM7/23/19
to Racket Users
Is it OK to wrap declare-bundle! + store-bundle inside (begin-for-syntax ...) to make side effect during raco setup? If not, what is preferred way to do it?

понедельник, 22 июля 2019 г., 15:56:13 UTC+5 пользователь Roman Klochkov написал:

Bogdan Popa

unread,
Jul 23, 2019, 3:00:25 AM7/23/19
to Roman Klochkov, Racket Users
> Is it OK to wrap declare-bundle! + store-bundle inside (begin-for-syntax
> ...) to make side effect during raco setup? If not, what is preferred way
> to do it?

Is there any reason not to do it at runtime? This[1] is what I do in
forms-lib. Other modules depend on that module so the bundles are
declared the first time it is loaded. It's not optimal for versioning,
but it gets the job done.


[1]: https://github.com/Bogdanp/racket-forms/blob/master/forms-lib/private/l10n.rkt#L27-L33

Roman Klochkov

unread,
Jul 24, 2019, 2:02:17 AM7/24/19
to Racket Users
I dont like (unless (load-bundle! specifier) ...) clause.
If you change the translation in source code, old version will be used, because (load-bundle! specifier) will load old version and return #t.

вторник, 23 июля 2019 г., 12:00:25 UTC+5 пользователь Bogdan Popa написал:
Reply all
Reply to author
Forward
0 new messages