diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c4381d8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +source/locale/ +pages/ +build/ diff --git a/Makefile b/Makefile index 97598ab..def5531 100644 --- a/Makefile +++ b/Makefile @@ -1,42 +1,60 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SOURCE = en_US -VERSION = 1.1 -LANGUAGE = en -INTL_LOCALES = -l de -l fr -l sk -# use tags to include documentation for specific plugins -TAGS = -t archive -t acl -t zipdownload -t v1.1 -SPHINXOPTS = -c . -D language='$(LANGUAGE)' -D version='$(VERSION)' -D release='$(VERSION)' -SPHINXBUILD = sphinx-build -SPHINXINTL = sphinx-intl -BUILDDIR = _build - -ALLSPHINXOPTS = $(SPHINXOPTS) $(TAGS) -d $(BUILDDIR)/doctrees/$(SOURCE) -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCE) $(TAGS) - -all: html +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Use the two-character language code here, else the .po files are not found. +LANGUAGE ?= en +VERSION ?= 1.1 +TAGS ?= -t archive -t acl -t zipdownload + + +.PHONY: help Makefile clean push-to-transifex pull-from-transifex en de fr sk pages + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) clean: - rm -rf $(BUILDDIR)/html - mkdir -p $(BUILDDIR)/locale/_plugins - -html: conf.py _static/default.css - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(SOURCE) $(BUILDDIR)/html/doc/help/$(VERSION)/$(SOURCE) - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html/doc/help/$(VERSION)/$(SOURCE)." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - $(SPHINXINTL) update -p $(BUILDDIR)/locale -d locale $(INTL_LOCALES) - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -update-txconfig-resources: - @echo "Removing _plugins locale files..." - rm -rf locale/*/LC_MESSAGES/_plugins/* - rm -rf $(BUILDDIR)/locale/_plugins/* - $(SPHINXINTL) update-txconfig-resources --transifex-project-name roundcube-webmail-help -p $(BUILDDIR)/locale -d locale - @echo - @echo "Transifex resources have been updated." + rm -rvf build pages source/locale + +push-to-transifex: clean gettext + sphinx-intl update-txconfig-resources --transifex-organization-name roundcubemail --transifex-project-name roundcube-webmail-help + tx push -s + +pull-from-transifex: gettext + tx pull -l $(LANGUAGE) + +pages-mkdir: + mkdir -p pages/doc/help/$(VERSION) + +en: pages-mkdir + make html + mv -v build/html pages/doc/help/$(VERSION)/en_US + # Copy the generic index to all intermediate directories to provide links to the actual docs. + mv -v pages/doc/help/$(VERSION)/en_US/generic-index.html pages/index.html + sed -i -e 's##\n#' pages/index.html + cp -v pages/index.html pages/doc/ + cp -v pages/index.html pages/doc/help/ + cp -v pages/index.html pages/doc/help/$(VERSION)/ + +de: pages-mkdir + make LANGUAGE=de pull-from-transifex html + mv -v build/html pages/doc/help/$(VERSION)/de_DE + +fr: pages-mkdir + make LANGUAGE=fr pull-from-transifex html + mv -v build/html pages/doc/help/$(VERSION)/fr_FR + +sk: pages-mkdir + make LANGUAGE=sk pull-from-transifex html + mv -v build/html pages/doc/help/$(VERSION)/sk_SK + +pages: clean en de fr sk + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" -t v$(VERSION) $(TAGS) -D version=$(VERSION) -D language=$(LANGUAGE) $(SPHINXOPTS) $(O) diff --git a/README.md b/README.md index 13bbd3b..509071b 100644 --- a/README.md +++ b/README.md @@ -15,14 +15,22 @@ First of all you need Python and [Sphinx][sphinx] installed. Grab the latest ver sudo easy_install -U Sphinx +Alteratively you can use a container image. Have a look at `install-deps-in-sphinx-container.sh`. + This repo already contains the Sphinx project configuration and can be generated right away with the following command: cd - make + make html The above example generates the English (US) online help files with English localization -for the navigation into the `_build/html/1.0/en_US` output directory. +for the navigation into the `build/html/en_US` output directory. + +To generate the pages for all available languages and produce the document tree that is served on , run: + + make pages + +This builds the document tree in the `pages` directory. Integrating Help for Plugins @@ -64,17 +72,23 @@ Generating Translated Files tx pull -f -l fr ``` -2. Compile `.mo` files: - - ``` - sphinx-intl build - ``` - 3. Run Sphinx to build the localized docs by using the LANGUAGE parameter: ``` make LANGUAGE=fr html ``` + (Note: do not specify a 5-character `locale` here, it won't work.) + + +Adding languages +---------------- + +To add a language to the list of generated pages, follow these steps: + +1. Add a section to the `Makefile`. +1. Add the language to the `pages` target in the `Makefile`. +2. Add a link to `source/_static/generic-index.html` + Skins Support ------------- diff --git a/_ext/__init__.py b/_ext/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/_static/default.css b/_static/default.css deleted file mode 100755 index 0f8994d..0000000 --- a/_static/default.css +++ /dev/null @@ -1,374 +0,0 @@ -/* - * default.css - * ~~~~~~~~~~~ - * - * Sphinx stylesheet -- Roundcube theme - * - * :copyright: Copyright 2013 by the Roundcube Dev Team - * :license: Creative Commons Attribution-ShareAlike - * - */ - -@import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -body { - font-family: Helvetica,Arial,sans-serif; - font-size: small; - background: #efefef; - color: #333; - margin: 0; - padding: 0; - line-height: 130%; -} - -div.banner { - margin: 0 0 3px 0; - padding: 10px 0; - height: 40px; - - background: #d8edfd; - background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2YxZjhmYyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNkN2VjZmMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); - background: -moz-linear-gradient(top, #f1f8fc 0%, #d7ecfc 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f1f8fc), color-stop(100%,#d7ecfc)); - background: -webkit-linear-gradient(top, #f1f8fc 0%, #d7ecfc 100%); - background: -o-linear-gradient(top, #f1f8fc 0%, #d7ecfc 100%); - background: -ms-linear-gradient(top, #f1f8fc 0%, #d7ecfc 100%); - background: linear-gradient(to bottom, #f1f8fc 0%, #d7ecfc 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f1f8fc', endColorstr='#d7ecfc', GradientType=0); - box-shadow: rgba(25, 25, 25, 0.2) 0 1px 3px; -} - -h1.banner-logo { - font-size: 20px; - font-weight: normal; - color: #333; - margin: 0 0 8px 0; - padding: 0; -} - -div.bannerwrapper, -div.documentinner, -div.footline div.related { - margin: 0 auto; - padding-left: 20px; - padding-right: 20px; - max-width: 960px; -} - -div.document { - padding: 5px 0; - background: #fff; -} - -div.documentwrapper { - float: left; - width: 72%; -} - -div.bodywrapper { -} - -div.body { - background-color: #fff; - color: #000; - padding: 0 20px 30px 0; -} - -div.footer { - width: 100%; - padding: 9px 0 9px 0; - text-align: center; - font-size: 75%; - border-top: 1px solid #ccc; -} - -div.footer a { - text-decoration: underline; -} - -div.footline { - background: #e2e2e2; - border-top: 1px solid #ccc; -} - -div.related { - background: none; - padding: 6px 20px; - width: auto; - min-height: 16px; - font-size: inherit; -} - -div.banner div.related { - padding: 0; - background: none; - border: 0; -} - -div.related ul { - padding: 0; -} - -div.related a { - color: #666; - text-transform: capitalize; -} - -div.sphinxsidebar { - float: right; - margin: 0; - width: 26%; -} - -div.sphinxsidebarwrapper { - padding: 10px; - background: #efefef; -} - -div.sphinxsidebar h3 { - font-size: 1.4em; - font-weight: normal; - margin: 0; - padding: 0; - color: #333; -} - -div.sphinxsidebar h3 a { - color: #333; -} - -div.sphinxsidebar h4 { - font-size: 1.3em; - font-weight: normal; - margin: 5px 0 0 0; - padding: 0; - color: #333; -} - -div.sphinxsidebar p { - -} - -div.sphinxsidebar p.topless { - margin: 5px 10px 10px 10px; -} - -div.sphinxsidebar ul { - margin: 10px; - padding: 0; -} - -div.sphinxsidebar input { - border: 1px solid #98dbcc; - font-family: sans-serif; - font-size: 1em; - padding: 4px 8px; -} - - - -/* -- hyperlink styles ------------------------------------------------------ */ - -a { - color: #0069a6; - text-decoration: none; -} - -a:visited { - color: #355f7c; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - - - -/* -- body styles ----------------------------------------------------------- */ - -div.body h1, -div.body h2, -div.body h3, -div.body h4, -div.body h5, -div.body h6 { - color: #333; - margin: 30px 0 10px 0; - padding: 5px 0; -} - -div.body h1 { - font-weight: normal; - font-size: 190%; - border-bottom: 1px solid #ddd; -} -div.body h2 { - font-size: 130%; -} -div.body h3 { - font-size: 110%; - margin-top: 20px; - margin-bottom: 0; -} -div.body h4 { - font-size: 100%; - margin-top: 20px; - margin-bottom: 0; -} - -div.body h1:first-child, -div.body div.section:first-child h1 { - margin-top: 10px; -} - -em { - font-weight: bolder; - color: #666; - padding-right: 0.1em; -} - -a.reference em { - font-weight: normal; - color: inherit; -} - -a.headerlink { - color: #0069a6; - font-size: 0.8em; - padding: 0 4px 0 4px; - text-decoration: none; -} - -a.headerlink:hover { - background-color: #0069a6; - color: #fff; -} - -div.body p, div.body dd, div.body li { - text-align: justify; - line-height: 130%; -} - -div.body h1, div.body h2 { - clear: both; -} - -div.body p img { - vertical-align: middle; -} - -div.body div.hint, -div.body div.note { - color: #444; - background-color: #def3fe; - border: 1px solid #c5d7e0; - padding: 8px; -} - -div.body div.note { - color: #000; -} - -div.admonition p.admonition-title + p { - display: inline; -} - -div.admonition p { - margin-bottom: 5px; -} - -div.admonition pre { - margin-bottom: 5px; -} - -div.admonition ul, div.admonition ol { - margin-bottom: 5px; -} - -div.note { - background-color: #eee; - border: 1px solid #ccc; -} - -div.seealso { - background-color: #ffc; - border: 1px solid #ff6; -} - -div.topic { - background-color: #eee; -} - -div.warning { - background-color: #ffe4e4; - border: 1px solid #f66; -} - -p.admonition-title { - display: inline; -} - -p.admonition-title:after { - content: ":"; -} - -div.image-left img { - float: left; - margin-right: 1em; -} - -div.image-left p { - display: inline; - clear: left; -} - -div.image-right img { - float: right; - margin-left: 1em; -} - -div.image-right p { - display: inline; - clear: right; -} - -pre { - padding: 5px; - background-color: #eeffcc; - color: #333333; - line-height: 120%; - border: 1px solid #ac9; - border-left: none; - border-right: none; -} - -tt { - background-color: #ecf0f3; - padding: 0 1px 0 1px; - font-size: 1em; -} - -th { - background-color: #ede; -} - -.warning tt { - background: #efc2c2; -} - -.note tt { - background: #d6d6d6; -} - -.viewcode-back { - font-family: sans-serif; -} - -div.viewcode-block:target { - background-color: #f4debf; - border-top: 1px solid #ac9; - border-bottom: 1px solid #ac9; -} \ No newline at end of file diff --git a/_templates/layout.html b/_templates/layout.html deleted file mode 100644 index 8876dd6..0000000 --- a/_templates/layout.html +++ /dev/null @@ -1,32 +0,0 @@ -{% extends "!layout.html" %} - -{% block rootrellink %} -
  • {{ _('search') }} |
  • -
  • {{ _('home') }} |
  • -{% endblock %} - -{% block relbar1 %} - -{% endblock %} - -{% block relbar2 %} -
    -{{ super() }} -
    -{% endblock %} - -{# put the sidebar inside the document #} -{% block document %} -
    -{{ super() }} -{{ sidebar() }} -
    -{% endblock %} -{% block sidebar1 %}{% endblock %} -{% block sidebar2 %}{% endblock %} diff --git a/bin/install-deps-in-sphinx-container.sh b/bin/install-deps-in-sphinx-container.sh new file mode 100755 index 0000000..be58f2e --- /dev/null +++ b/bin/install-deps-in-sphinx-container.sh @@ -0,0 +1,12 @@ +#!/bin/bash -e + +# Run this script in docker.io/sphinxdoc/sphinx to get a fully staffed +# container for building the site: +# $> docker run -it --rm -v $PWD:/docs -v ~/.transifexrc:/root/.transifexrc docker.io/sphinxdoc/sphinx:latest bash -ec './bin/install-deps-in-sphinx-container.sh; make pages' + +apt update +apt install --no-install-recommends -y sphinx-intl curl +pip install 'sphinx-intl[transifex]' +cd /usr/local/bin +curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash +cd - diff --git a/conf.py b/conf.py deleted file mode 100755 index 0aac04a..0000000 --- a/conf.py +++ /dev/null @@ -1,312 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Roundcube Webmail Help documentation build configuration file, created by -# sphinx-quickstart on Wed Jul 3 11:29:22 2013. -# -# This file is execfile()d with the current directory set to its containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -import sys, os, glob, importlib.util - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -try: - sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '_ext')) -except: - sys.path.append(os.path.join(os.getcwd(), '_ext')) - -# -- General configuration ----------------------------------------------------- - -# If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be extensions -# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.todo'] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates','../_templates'] - -# The suffix of source filenames. -source_suffix = '.rst' - -# The encoding of source files. -#source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'Roundcube Webmail Help' -copyright = u'2015, roundcube.net' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = '1.1' -# The full version, including alpha/beta/rc tags. -release = '1.1' - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -language = None - -locale_dirs = ['../locale'] -gettext_compact = False - -# add this substitution to every page -rst_epilog = """ -""" - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -#today = '' -# Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -exclude_patterns = ['_build','*.off/*'] - -# The reST default role (used for this markup: `text`) to use for all documents. -#default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -#add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -#show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] - -# If true, keep warnings as "system message" paragraphs in the built documents. -#keep_warnings = False - - -# -- Options for HTML output --------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -html_theme = 'default' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -#html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -#html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -#html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -#html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -#html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -#html_additional_pages = {} - -# If false, no module index is generated. -#html_domain_indices = True - -# If false, no index is generated. -#html_use_index = True - -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, links to the reST sources are added to the pages. -html_show_sourcelink = False - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None - -# Output file base name for HTML help builder. -htmlhelp_basename = 'RoundcubeWebmailHelpdoc' - - -# -- Options for LaTeX output -------------------------------------------------- - -latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', - -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', - -# Additional stuff for the LaTeX preamble. -#'preamble': '', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, documentclass [howto/manual]). -latex_documents = [ - ('index', 'RoundcubeWebmailHelp.tex', project + ' Documentation', - u'roundcube.net', 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -#latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -#latex_use_parts = False - -# If true, show page references after internal links. -#latex_show_pagerefs = False - -# If true, show URL addresses after external links. -#latex_show_urls = False - -# Documents to append as an appendix to all manuals. -#latex_appendices = [] - -# If false, no module index is generated. -#latex_domain_indices = True - - -# -- Options for manual page output -------------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - ('index', 'roundcubewebmailhelp', project + ' Documentation', - [u'roundcube.net'], 1) -] - -# If true, show URL addresses after external links. -#man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------------ - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - ('index', 'RoundcubeWebmailHelp', project + ' Documentation', - u'roundcube.net', 'RoundcubeWebmailHelp', 'One line description of project.', - 'Miscellaneous'), -] - -# Documents to append as an appendix to all manuals. -#texinfo_appendices = [] - -# If false, no module index is generated. -#texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' - -# If true, do not generate a @detailmenu in the "Top" node's menu. -#texinfo_no_detailmenu = False - - -# -- Custom Options for Roundcube docs ----------------------------------------- - -variables = { - 'skin': 'larry' -} - -default_tags = [] -custom_tags = False - -config_files = glob.glob('./*/_plugins/*/conf.py') - -if os.path.exists('./conf.local.py'): - config_files.append(os.path.relpath('./conf.local.py')) - -# collect variables from plugin configs -for pathname in config_files: - try: - spec = importlib.util.spec_from_file_location('conf', pathname) - conf = importlib.util.module_from_spec(spec) - loader.exec_module(conf) - if hasattr(conf, 'variables'): - variables.update(conf.variables) - if hasattr(conf, 'tags'): - custom_tags = True - for tag in conf.tags: - tags.add(tag) - if hasattr(conf, 'module_tags'): - default_tags += conf.module_tags - if hasattr(conf, 'extensions'): - extensions += conf.extensions - for varname in ['project','copyright','version','release']: - if hasattr(conf, varname): - locals()[varname] = getattr(conf, varname) - # TODO: merge other config options like rst_prolog, rst_epilog, etc. - except Exception(e): - print("Failed to open config file", pathname) - print(e) - -# add default tags if no custom ones defined -if not custom_tags: - for tag in default_tags: - tags.add(tag) - -# add variables as substitutions to the head of each page -rst_prolog = "" -for var,repl in variables.items(): - rst_prolog += " .. |%s| replace:: %s\n" % (var, repl) - rst_prolog += " .. |**%s**| replace:: **%s**\n" % (var, repl) - - -# forward variables for substitutions in fancyfigures -fancyfigure_variables = variables diff --git a/locale/.gitignore b/locale/.gitignore deleted file mode 100644 index f59ec20..0000000 --- a/locale/.gitignore +++ /dev/null @@ -1 +0,0 @@ -* \ No newline at end of file diff --git a/setskin.sh b/setskin.sh index bb47348..41a1e24 100755 --- a/setskin.sh +++ b/setskin.sh @@ -7,7 +7,7 @@ if [ -z "$SKIN" ]; then exit fi -for m in _static/_skin `find -L en_US -name '_skin'`; do +for m in source/_static/_skin `find -L source -name '_skin'`; do dir=`dirname $m` echo "$m -> $SKIN" (cd $dir && unlink _skin && ln -s $SKIN _skin) diff --git a/en_US/_plugins/README.md b/source/_plugins/README.md similarity index 100% rename from en_US/_plugins/README.md rename to source/_plugins/README.md diff --git a/en_US/_static/_skin b/source/_static/_skin similarity index 100% rename from en_US/_static/_skin rename to source/_static/_skin diff --git a/en_US/_static/kolab/acl-add.png b/source/_static/kolab/acl-add.png similarity index 100% rename from en_US/_static/kolab/acl-add.png rename to source/_static/kolab/acl-add.png diff --git a/en_US/_static/kolab/compose-options.png b/source/_static/kolab/compose-options.png similarity index 100% rename from en_US/_static/kolab/compose-options.png rename to source/_static/kolab/compose-options.png diff --git a/en_US/_static/kolab/listmode-switch.png b/source/_static/kolab/listmode-switch.png similarity index 100% rename from en_US/_static/kolab/listmode-switch.png rename to source/_static/kolab/listmode-switch.png diff --git a/en_US/_static/kolab/overview.png b/source/_static/kolab/overview.png similarity index 100% rename from en_US/_static/kolab/overview.png rename to source/_static/kolab/overview.png diff --git a/en_US/_static/kolab/preview-headers.png b/source/_static/kolab/preview-headers.png similarity index 100% rename from en_US/_static/kolab/preview-headers.png rename to source/_static/kolab/preview-headers.png diff --git a/en_US/_static/larry/acl-add.png b/source/_static/larry/acl-add.png similarity index 100% rename from en_US/_static/larry/acl-add.png rename to source/_static/larry/acl-add.png diff --git a/en_US/_static/larry/compose-options.png b/source/_static/larry/compose-options.png similarity index 100% rename from en_US/_static/larry/compose-options.png rename to source/_static/larry/compose-options.png diff --git a/en_US/_static/larry/listmode-switch.png b/source/_static/larry/listmode-switch.png similarity index 100% rename from en_US/_static/larry/listmode-switch.png rename to source/_static/larry/listmode-switch.png diff --git a/en_US/_static/larry/overview.png b/source/_static/larry/overview.png similarity index 100% rename from en_US/_static/larry/overview.png rename to source/_static/larry/overview.png diff --git a/en_US/_static/larry/preview-headers.png b/source/_static/larry/preview-headers.png similarity index 100% rename from en_US/_static/larry/preview-headers.png rename to source/_static/larry/preview-headers.png diff --git a/source/_templates/generic-index.html b/source/_templates/generic-index.html new file mode 100644 index 0000000..acd82d1 --- /dev/null +++ b/source/_templates/generic-index.html @@ -0,0 +1,17 @@ +{% extends '!layout.html' %} + +{%- block body %} + +

    Roundcubemail docs

    + +

    Here are the Roundcubmail docs in the available languages:

    + +

    + +{{ super() }} +{%- endblock %} diff --git a/en_US/addressbook/addressbookview.rst b/source/addressbook/addressbookview.rst similarity index 100% rename from en_US/addressbook/addressbookview.rst rename to source/addressbook/addressbookview.rst diff --git a/en_US/addressbook/editing.rst b/source/addressbook/editing.rst similarity index 100% rename from en_US/addressbook/editing.rst rename to source/addressbook/editing.rst diff --git a/en_US/addressbook/importexport.rst b/source/addressbook/importexport.rst similarity index 100% rename from en_US/addressbook/importexport.rst rename to source/addressbook/importexport.rst diff --git a/en_US/addressbook/index.rst b/source/addressbook/index.rst similarity index 100% rename from en_US/addressbook/index.rst rename to source/addressbook/index.rst diff --git a/en_US/addressbook/searching.rst b/source/addressbook/searching.rst similarity index 100% rename from en_US/addressbook/searching.rst rename to source/addressbook/searching.rst diff --git a/source/conf.py b/source/conf.py new file mode 100644 index 0000000..690d82e --- /dev/null +++ b/source/conf.py @@ -0,0 +1,38 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = 'Roundcubemail' +copyright = '2024, Roundcubemail developers & contributors' +author = 'Roundcubemail developers & contributors' + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = [] + +templates_path = ['_templates'] +exclude_patterns = [] + + + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = 'pyramid' +html_static_path = ['_static'] + +locale_dirs = ['locale/'] # path is example but recommended. +gettext_compact = False # optional. + +# Don't render a link in the sidebar to the source code of each page. +html_show_sourcelink = False + + +html_additional_pages = { + 'generic-index': 'generic-index.html', +} diff --git a/en_US/index.rst b/source/index.rst similarity index 100% rename from en_US/index.rst rename to source/index.rst diff --git a/en_US/login.rst b/source/login.rst similarity index 100% rename from en_US/login.rst rename to source/login.rst diff --git a/en_US/mail/compose.rst b/source/mail/compose.rst similarity index 100% rename from en_US/mail/compose.rst rename to source/mail/compose.rst diff --git a/en_US/mail/importexport.rst b/source/mail/importexport.rst similarity index 100% rename from en_US/mail/importexport.rst rename to source/mail/importexport.rst diff --git a/en_US/mail/index.rst b/source/mail/index.rst similarity index 100% rename from en_US/mail/index.rst rename to source/mail/index.rst diff --git a/en_US/mail/mailview.rst b/source/mail/mailview.rst similarity index 100% rename from en_US/mail/mailview.rst rename to source/mail/mailview.rst diff --git a/en_US/mail/organization.rst b/source/mail/organization.rst similarity index 100% rename from en_US/mail/organization.rst rename to source/mail/organization.rst diff --git a/en_US/mail/reading.rst b/source/mail/reading.rst similarity index 100% rename from en_US/mail/reading.rst rename to source/mail/reading.rst diff --git a/en_US/mail/searching.rst b/source/mail/searching.rst similarity index 100% rename from en_US/mail/searching.rst rename to source/mail/searching.rst diff --git a/en_US/overview.rst b/source/overview.rst similarity index 100% rename from en_US/overview.rst rename to source/overview.rst diff --git a/en_US/settings/folders.rst b/source/settings/folders.rst similarity index 100% rename from en_US/settings/folders.rst rename to source/settings/folders.rst diff --git a/en_US/settings/identities.rst b/source/settings/identities.rst similarity index 100% rename from en_US/settings/identities.rst rename to source/settings/identities.rst diff --git a/en_US/settings/index.rst b/source/settings/index.rst similarity index 100% rename from en_US/settings/index.rst rename to source/settings/index.rst diff --git a/en_US/settings/preferences.rst b/source/settings/preferences.rst similarity index 100% rename from en_US/settings/preferences.rst rename to source/settings/preferences.rst diff --git a/en_US/settings/responses.rst b/source/settings/responses.rst similarity index 100% rename from en_US/settings/responses.rst rename to source/settings/responses.rst