mirror of https://github.com/kiwix/libkiwix.git
Language code in /catalog/v2/languages entries
This commit is contained in:
parent
5f90f5ee2a
commit
8a4248e48e
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom"
|
||||
xmlns:dc="http://purl.org/dc/terms/"
|
||||
xmlns:opds="https://specs.opds.io/opds-1.2">
|
||||
<id>{{feed_id}}</id>
|
||||
<link rel="self"
|
||||
|
@ -14,6 +15,7 @@
|
|||
{{#languages}}
|
||||
<entry>
|
||||
<title>{{lang_self_name}}</title>
|
||||
<dc:language>{{{lang_code}}}</dc:language>
|
||||
<link rel="subsection"
|
||||
href="{{endpoint_root}}/entries?lang={{{lang_code}}}"
|
||||
type="application/atom+xml;profile=opds-catalog;kind=acquisition"/>
|
||||
|
|
|
@ -1020,6 +1020,7 @@ TEST_F(LibraryServerTest, catalog_v2_languages)
|
|||
EXPECT_EQ(r->status, 200);
|
||||
const char expected_output[] = R"(<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom"
|
||||
xmlns:dc="http://purl.org/dc/terms/"
|
||||
xmlns:opds="https://specs.opds.io/opds-1.2">
|
||||
<id>12345678-90ab-cdef-1234-567890abcdef</id>
|
||||
<link rel="self"
|
||||
|
@ -1033,6 +1034,7 @@ TEST_F(LibraryServerTest, catalog_v2_languages)
|
|||
|
||||
<entry>
|
||||
<title>English</title>
|
||||
<dc:language>eng</dc:language>
|
||||
<link rel="subsection"
|
||||
href="/catalog/v2/entries?lang=eng"
|
||||
type="application/atom+xml;profile=opds-catalog;kind=acquisition"/>
|
||||
|
@ -1042,6 +1044,7 @@ TEST_F(LibraryServerTest, catalog_v2_languages)
|
|||
</entry>
|
||||
<entry>
|
||||
<title>Français</title>
|
||||
<dc:language>fra</dc:language>
|
||||
<link rel="subsection"
|
||||
href="/catalog/v2/entries?lang=fra"
|
||||
type="application/atom+xml;profile=opds-catalog;kind=acquisition"/>
|
||||
|
@ -1051,6 +1054,7 @@ TEST_F(LibraryServerTest, catalog_v2_languages)
|
|||
</entry>
|
||||
<entry>
|
||||
<title>Русский</title>
|
||||
<dc:language>rus</dc:language>
|
||||
<link rel="subsection"
|
||||
href="/catalog/v2/entries?lang=rus"
|
||||
type="application/atom+xml;profile=opds-catalog;kind=acquisition"/>
|
||||
|
|
Loading…
Reference in New Issue