Skip to content

Commit

Permalink
Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
SvenMichaelKlose committed Jan 21, 2025
1 parent 5fb454f commit c3d51c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
12 changes: 3 additions & 9 deletions modules/lml/autoform.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
*autoform-widgets*))

(defmacro def-editable-autoform-widget (args predicate &body body)
`(push {:predicate ,predicate
:maker #'(,args ,@body)}
*autoform-widgets*))
`(def-autoform-widget ,args ,predicate ,@body))

(macro autoform-fn (name (schema data &optional key) &rest body)
`(progn
Expand Down Expand Up @@ -55,15 +53,11 @@
:widgets ,widgets)]
data)))

(fn autoform-i18n (x)
(? (json-object? x)
x.en
x))

(autoform-fn autoform-property (schema data)
(!= (aref schema.properties props.key)
`(label :class "autoform-property"
(span ,(| (autoform-i18n !.title) props.key))
(span ,(| (i18n !.title)
props.key))
(autoform-field :key ,props.key
:schema ,!
:data ,data
Expand Down
2 changes: 1 addition & 1 deletion modules/lml/i18n.lisp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(fn i18n (x)
(? (object? x)
(ref x (downcase (symbol-name *language*)))
(ref x (downcase (symbol-name (car (ensure-list *language*)))))
x))

0 comments on commit c3d51c2

Please sign in to comment.