summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivien Kraus <vivien@planete-kraus.eu>2021-10-10 20:25:45 +0200
committerVivien Kraus <vivien@planete-kraus.eu>2021-10-12 22:39:11 +0200
commitbf0a443e50c113cf759ec3e9ca898a3f10abd7ba (patch)
treef756f253eeebc319cafb16d04314a599cc961488
parent2a6b9783c3a4a850007153c8361e64c80f8ba92d (diff)
client: allow #f for an etag value
-rw-r--r--po/disfluid.pot14
-rw-r--r--po/fr.po22
-rw-r--r--src/scm/webid-oidc/client/application.scm5
3 files changed, 21 insertions, 20 deletions
diff --git a/po/disfluid.pot b/po/disfluid.pot
index 0c65bc1..747a445 100644
--- a/po/disfluid.pot
+++ b/po/disfluid.pot
@@ -641,31 +641,31 @@ msgid ""
"phrase) should be a string"
msgstr ""
-#: src/scm/webid-oidc/client/application.scm:466
+#: src/scm/webid-oidc/client/application.scm:467
msgid ""
-"the etag (#:etag) should be a string, the links (#:links) should be a list "
-"of links, the content-type (#:content-type) should be a symbol, and the "
+"the etag (#:etag) should be a string or #f, the links (#:links) should be a "
+"list of links, the content-type (#:content-type) should be a symbol, and the "
"content (#:content) should be a string or a bytevector"
msgstr ""
-#: src/scm/webid-oidc/client/application.scm:502
+#: src/scm/webid-oidc/client/application.scm:503
msgid ""
"the desired links (#:desired-links) should be an alist from URI to alists, "
"the desired content-type (#:desired-content-type) should be a symbol, and "
"the desired content (#:desired-content) should be a string or a bytevector"
msgstr ""
-#: src/scm/webid-oidc/client/application.scm:586
+#: src/scm/webid-oidc/client/application.scm:587
#, scheme-format
msgid "Loading ~a..."
msgstr ""
-#: src/scm/webid-oidc/client/application.scm:665
+#: src/scm/webid-oidc/client/application.scm:666
#, scheme-format
msgid "Updating ~a (expected ETag ~a)"
msgstr ""
-#: src/scm/webid-oidc/client/application.scm:712
+#: src/scm/webid-oidc/client/application.scm:713
#, scheme-format
msgid "Deleting ~a (expected ETag ~a)"
msgstr ""
diff --git a/po/fr.po b/po/fr.po
index af9792b..858809e 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: webid-oidc 0.0.0\n"
"Report-Msgid-Bugs-To: vivien@planete-kraus.eu\n"
"POT-Creation-Date: 2021-10-12 22:35+0200\n"
-"PO-Revision-Date: 2021-10-12 22:34+0200\n"
+"PO-Revision-Date: 2021-10-12 22:38+0200\n"
"Last-Translator: Vivien Kraus <vivien@planete-kraus.eu>\n"
"Language-Team: French <vivien@planete-kraus.eu>\n"
"Language: fr\n"
@@ -696,18 +696,18 @@ msgstr ""
"le code d’erreur (#:code) doit être un entier et l’explication (#:reason-"
"phrase) doit être une chaîne de caractères"
-#: src/scm/webid-oidc/client/application.scm:466
+#: src/scm/webid-oidc/client/application.scm:467
msgid ""
-"the etag (#:etag) should be a string, the links (#:links) should be a list "
-"of links, the content-type (#:content-type) should be a symbol, and the "
+"the etag (#:etag) should be a string or #f, the links (#:links) should be a "
+"list of links, the content-type (#:content-type) should be a symbol, and the "
"content (#:content) should be a string or a bytevector"
msgstr ""
-"l’etag (#:etag) doit être une chaîne de caractères, les liens (#:links) "
-"doivent être une liste de liens, le type de contenu (#:content-type) doit "
-"être un symbole, et le contenu (#:content) doit être une chaîne de "
+"l’etag (#:etag) doit être une chaîne de caractères ou #f, les liens (#:"
+"links) doivent être une liste de liens, le type de contenu (#:content-type) "
+"doit être un symbole, et le contenu (#:content) doit être une chaîne de "
"caractères ou un vecteur d’octets"
-#: src/scm/webid-oidc/client/application.scm:502
+#: src/scm/webid-oidc/client/application.scm:503
msgid ""
"the desired links (#:desired-links) should be an alist from URI to alists, "
"the desired content-type (#:desired-content-type) should be a symbol, and "
@@ -718,17 +718,17 @@ msgstr ""
"symbole, et le ccontenu désiré (#:desired-content-type) doit être unne "
"chaîne de caractères ou un vecteur d’octets"
-#: src/scm/webid-oidc/client/application.scm:586
+#: src/scm/webid-oidc/client/application.scm:587
#, scheme-format
msgid "Loading ~a..."
msgstr "Chargement de ~a…"
-#: src/scm/webid-oidc/client/application.scm:665
+#: src/scm/webid-oidc/client/application.scm:666
#, scheme-format
msgid "Updating ~a (expected ETag ~a)"
msgstr "Mise à jour de ~a (ETag attendu ~a)"
-#: src/scm/webid-oidc/client/application.scm:712
+#: src/scm/webid-oidc/client/application.scm:713
#, scheme-format
msgid "Deleting ~a (expected ETag ~a)"
msgstr "Suppression de ~a (ETag attendu ~a)"
diff --git a/src/scm/webid-oidc/client/application.scm b/src/scm/webid-oidc/client/application.scm
index 172866b..e2bb4b6 100644
--- a/src/scm/webid-oidc/client/application.scm
+++ b/src/scm/webid-oidc/client/application.scm
@@ -452,7 +452,8 @@
(content-type content-type)
(content content))
(match `(,etag ,links ,content-type ,content)
- (((? string? etag)
+ (((or (? not etag)
+ (? string? etag))
(? all-links? links)
(? symbol? content-type)
(or (? string? content)
@@ -463,7 +464,7 @@
(slot-set! page 'content content))
(else
(scm-error 'wrong-type-arg "make <error-page>"
- (G_ "the etag (#:etag) should be a string, the links (#:links) should be a list of links, the content-type (#:content-type) should be a symbol, and the content (#:content) should be a string or a bytevector")
+ (G_ "the etag (#:etag) should be a string or #f, the links (#:links) should be a list of links, the content-type (#:content-type) should be a symbol, and the content (#:content) should be a string or a bytevector")
'()
(list etag links content-type content)))))))