diff --git a/getJSON.php b/getJSON.php index cdd5a4f..24dc92e 100644 --- a/getJSON.php +++ b/getJSON.php @@ -26,7 +26,7 @@ $currentPage = Page::getPage ($page, $qid, $query, $n); $currentPage->InitializeContent (); - $out = array ( "title" => $currentPage->title, "version" => VERSION); + $out = array ( "title" => $currentPage->title); $entries = array (); foreach ($currentPage->entryArray as $entry) { array_push ($entries, $entry->getContentArray ()); @@ -55,7 +55,8 @@ $out ["currentPage"] = $currentPage->n; } if (!is_null (getURLParam ("complete"))) { - $out ["i18n"] = array ("coverAlt" => localize("i18n.coversection"), + $out ["const"] = array ("version" => VERSION, "i18n" => array ( + "coverAlt" => localize("i18n.coversection"), "authorsTitle" => localize("authors.title"), "bookwordTitle" => localize("bookword.title"), "tagsTitle" => localize("tags.title"), @@ -72,7 +73,7 @@ "languagesTitle" => localize("language.title"), "contentTitle" => localize("content.summary"), "sortorderAsc" => localize("search.sortorder.asc"), - "sortorderDesc" => localize("search.sortorder.desc")); + "sortorderDesc" => localize("search.sortorder.desc"))); } $out ["containsBook"] = 0; diff --git a/templates/default/bookdetail.html b/templates/default/bookdetail.html index 07c9870..8cba571 100644 --- a/templates/default/bookdetail.html +++ b/templates/default/bookdetail.html @@ -2,7 +2,7 @@ {{? it.book.hasCover == 1}} - {{=it.i18n.coverAlt}} + {{=it.const.i18n.coverAlt}} {{?}} @@ -11,16 +11,16 @@ {{=data.format}}
{{~}} -

{{=it.i18n.permalinkAlt}}{{=htmlEscape (it.title)}}

+

{{=it.const.i18n.permalinkAlt}}{{=htmlEscape (it.title)}}

-

{{=it.i18n.authorsTitle}}:

+

{{=it.const.i18n.authorsTitle}}:

{{~it.book.authors:author:j}} {{? j > 0}}, {{?}}{{=htmlEscape (author.name)}} {{~}}

{{? it.book.tagsName != ""}}

-

{{=it.i18n.tagsTitle}}:

+

{{=it.const.i18n.tagsTitle}}:

{{~it.book.tags:tag:k}} {{? k > 0}}, {{?}}{{=htmlEscape (tag.name)}} {{~}} @@ -28,22 +28,22 @@ {{?}} {{? it.book.seriesName != ""}}

-

{{=it.i18n.seriesTitle}} :

{{=htmlEscape (it.book.seriesCompleteName)}} +

{{=it.const.i18n.seriesTitle}} :

{{=htmlEscape (it.book.seriesCompleteName)}}

{{?}} {{? it.book.pubDate != ""}}

-

{{=it.i18n.pubdateTitle}}:

{{=it.book.pubDate}} +

{{=it.const.i18n.pubdateTitle}}:

{{=it.book.pubDate}}

{{?}} {{? it.book.languagesName != ""}}

-

{{=it.i18n.languagesTitle}}:

{{=it.book.languagesName}} +

{{=it.const.i18n.languagesTitle}}:

{{=it.book.languagesName}}

{{?}} {{? it.book.content != ""}}
-

{{=it.i18n.contentTitle}}

+

{{=it.const.i18n.contentTitle}}

{{=it.book.content}}
{{?}} \ No newline at end of file diff --git a/templates/default/footer.html b/templates/default/footer.html index 640a795..6c9863f 100644 --- a/templates/default/footer.html +++ b/templates/default/footer.html @@ -1,15 +1,15 @@ \ No newline at end of file diff --git a/templates/default/header.html b/templates/default/header.html index d1651eb..407bf06 100644 --- a/templates/default/header.html +++ b/templates/default/header.html @@ -1,8 +1,8 @@
- {{=it.i18n.homeAlt}} + {{=it.const.i18n.homeAlt}} - Settings and menu + Settings and menu

{{=it.title}}

@@ -10,7 +10,7 @@
- +
@@ -25,18 +25,18 @@ {{? it.containsBook == 1}}
- {{=it.i18n.sortAlt}} + {{=it.const.i18n.sortAlt}}
diff --git a/templates/default/main.html b/templates/default/main.html index 75c5463..d650241 100644 --- a/templates/default/main.html +++ b/templates/default/main.html @@ -16,7 +16,7 @@
{{? entry.book.hasCover == 1}} - {{=it.i18n.coverAlt}} + {{=it.const.i18n.coverAlt}} {{?}}

@@ -30,9 +30,9 @@ {{? entry.book.pubDate != ""}}({{=entry.book.pubDate}}){{?}} {{? entry.book.rating != ""}}{{=entry.book.rating}}{{?}}

-

{{=it.i18n.authorsTitle}} :

{{=htmlEscape (entry.book.authorsName)}}
- {{? entry.book.tagsName != ""}}

{{=it.i18n.tagsTitle}} :

{{=htmlEscape (entry.book.tagsName)}}
{{?}} - {{? entry.book.seriesName != ""}}

{{=it.i18n.seriesTitle}} :

{{=htmlEscape (entry.book.seriesName)}}
{{?}} +

{{=it.const.i18n.authorsTitle}} :

{{=htmlEscape (entry.book.authorsName)}}
+ {{? entry.book.tagsName != ""}}

{{=it.const.i18n.tagsTitle}} :

{{=htmlEscape (entry.book.tagsName)}}
{{?}} + {{? entry.book.seriesName != ""}}

{{=it.const.i18n.seriesTitle}} :

{{=htmlEscape (entry.book.seriesName)}}
{{?}}
{{?}} diff --git a/util.js b/util.js index fffa612..33757b6 100644 --- a/util.js +++ b/util.js @@ -36,7 +36,7 @@ function navigateTo (url) { } function updatePage (data) { - data ["i18n"] = currentData ["i18n"]; + data ["const"] = currentData ["const"]; currentData = data; var result = templatePage (data); document.title = data.title; @@ -73,7 +73,7 @@ function updatePage (data) { var url = $(this).attr("href"); var jsonurl = url.replace ("bookdetail", "getJSON"); $.getJSON(jsonurl, function(data) { - data ["i18n"] = currentData ["i18n"]; + data ["const"] = currentData ["const"]; var detail = templateBookDetail (data); $.fancybox( { content: detail,