refactoring by skill
This commit is contained in:
@@ -150,6 +150,30 @@ for page-local checklists.
|
||||
|
||||
@defmodule[racket-wiki/translate]
|
||||
|
||||
@defproc[(current-language [config any/c]) string?] {
|
||||
Returns the language stored for the wiki installation. When no readable
|
||||
language setting exists, the language in @racket[config] is returned.
|
||||
}
|
||||
|
||||
@defproc[(write-language! [config any/c] [language string?]) void?] {
|
||||
Stores @racket[language] in the configured wiki data directory.
|
||||
}
|
||||
|
||||
@defproc[(translation-page-slug [language any/c #f]) string?] {
|
||||
Returns the fixed slug of the special page containing translation overrides.
|
||||
The optional argument is retained for compatibility with older callers.
|
||||
}
|
||||
|
||||
@defproc[(translation-page-template) string?] {
|
||||
Builds initial Markdown content containing every built-in Dutch and English
|
||||
translation key.
|
||||
}
|
||||
|
||||
@defproc[(translations-for [config any/c]) hash?] {
|
||||
Returns all effective translations for the selected language, including any
|
||||
valid overrides from the special translations page.
|
||||
}
|
||||
|
||||
@defproc[(tr [config any/c] [key symbol?]) string?] {
|
||||
Returns the effective UI translation for @racket[key]. Built-in English and
|
||||
Dutch translations are available before the database is configured. Once the
|
||||
|
||||
Reference in New Issue
Block a user