The /packages.json and /sources.json are now built by an mcron job
running on the server behind guix.gnu.org. See maintenance.git commit
5664984bdd4a4ecbd7a2a5feb4033d610cea59fd.
* website/apps/packages/builder.scm, website/apps/packages/data.scm:
Remove.
* website/haunt.scm: Remove reference to (apps packages builder).
* website/po/POTFILES: New file. List apps files here.
* website/po/LINGUAS: New file. List en_US lingua.
* website/po/ietf-tags.scm: New file. Add association for en_US lingua.
* website/scripts/sexp-xgettext.scm: New file for generating a POT file.
(<keyword-spec>, <po-entry>, <construct-fold-state>): New record types.
(combine-duplicate-po-entries, complex-keyword-spec?, parse-scheme-file,
po-equal?, write-po-entry, update-ecomments-string!, update-file-name!,
update-old-line-number!, update-line-number!, incr-line-number!,
incr-line-number-for-each-nl!, current-ref, make-simple-po-entry,
matching-keyword, nth-exp, more-than-one-exp?, token->string-symbol-or-keyw,
complex-marked-list->po-entries, construct-po-entries, tag,
construct-msgid-and-po-entries, scheme-file->po-entries): New procedures.
(%keyword-specs, %options, %comments-line, %ecomments-string, %file-name,
%old-line-number, %line-number, %files-from-port, %source-files,
%output-po-entries, %output-port): New variables.
* website/sexp-xgettext.scm: New file with module for looking up
translations.
(%complex-keywords, %simple-keywords, %plural-numbers, %linguas):
New variables.
(<construct-fold-state>, <deconstruct-fold-state>): New record types.
(set-complex-keywords!, set-simple-keywords!, gettext-keyword?, tag,
sexp->msgid, deconstruct): New procedures.
(sgettext, spgettext, sngettext, snpgettext): New macro helpers.
* website/apps/i18n.scm: New file.
(G_, N_, C_, NC_, ietf-tags-file-contents): New syntax to use for i18n.
(%current-ietf-tag, %current-lang, %current-lingua): New variables.
(builder->localized-builder, builders->localized-builders,
localized-root-path, first-value): New utility procedures.
(<asset>, <page>): New imports from Haunt.
* website/haunt.scm: Wrap each builder to build the locale set in LC_ALL.
* website/.guix.scm: Make Haunt build directory writable so Haunt can
overwrite duplicate assets. Convert PO files to MO files and build for
each lingua.
* website/README: Adapt build instructions for i18n.
* website/i18n-howto: New file with usage instructions.
Suggested by sirgazil <sirgazil@zoho.com>.
* website/static/base/css/screenshots.css: Rename file to ...
* website/static/media/css/screenshots.css: ... this.
* website/apps/base/templates/screenshot.scm: Rename file to ...
* website/apps/media/templates/screenshot.scm: ... this.
(screenshot-t): Adapt path to CSS.
* website/apps/base/builder.scm (builder, screenshots-builder):
Move code for and references to screenshots-builder from here to ...
* website/apps/media/builder.scm: ... this new file.
* website/apps/base/data.scm (screenshots): Move from here to ...
* website/apps/media/data.scm: ... this new file.
* website/apps/base/templates/components.scm (screenshot->shtml):
Move from here to ...
* website/apps/media/templates/components.scm: ... this new file.
* website/apps/base/types.scm (<screenshot>, screenshot):
Move from here to ...
* website/apps/media/types.scm: ... this new file.
* website/apps/base/templates/home.scm: Adapt module references.
* website/haunt.scm (site): Add media builder.
* website/README: Remove documentation.
* website/apps/base/templates/help.scm (help-t): Use just one URL for
the refcard.
* website/apps/base/utils (guix-root-url-path): Use "/".
(builder): Remove big comment about bug #25227 and use expensive
builders.
* website/haunt.scm: Use guix.gnu.org domain.
This commit removes a comment about an old Haunt bug related to
using dots in URI paths to resources,¹ and updates the website build
directory '/tmp/gnu.org/software/guix'.
* website/haunt.scm (site): Update #:build-directory.
1. http://lists.gnu.org/archive/html/guile-user/2017-12/msg00070.html
Done by running these three commands from the website/ directory:
find -name \*.scm |xargs sed -i -es'/;;; GuixSD website --.*/;;; GNU Guix web site/g'
find -name \*.scm |xargs sed -i -es'/;;; GuixSD website/;;; The GNU Guix web site/g'
find -name \*.scm |xargs sed -i -es'/part of GuixSD website/part of the GNU Guix web site/g'
find -name \*.scm |xargs sed -i -es'/along with GuixSD website/along with the GNU Guix web site/g'
* website/www.scm (%atom-url, fetch-news, <news-entry>)
(news-items, news-entry->sxml): Remove.
(post->summary-sxml): New procedure.
(main-page): Add 'site' and 'posts' parameters. Use them to create the
"news-box".
* website/haunt.scm <site>: Add separate builder for guix.html.
* website/www/news.scm: New file.
* website/static/base/css/news.css: New file.
* website/haunt.scm (with-url-parameters): New macro.
(parameterized-procedure, parameterized-theme): New procedures.
<top level>: Use 'with-url-parameters' and add blog and atom feed.
This provides a simple way to build the website locally.
* website/haunt.scm: New file.
* website/README: Document the new build process.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>