Skip to content

Commit

Permalink
Switch to sphinx to be able to translate documentation
Browse files Browse the repository at this point in the history
We needed to translate in french the Omeka S's documentation, and mkdocs
does not fit our needs. Sphinx provides by default all the tools needed
to translate with PO files and generate translated documentation. The
generated documentation is the same as if it was generated by mkdocs.

Ideally, we think that all the PO files should be in the official
documentation repository, and they could be modified on Transifex, so
that anyone can participate to translation.

Instructions for translating are written inside translation.md
  • Loading branch information
jajm committed Sep 1, 2022
1 parent 2a4ab6f commit 7f32292
Show file tree
Hide file tree
Showing 27 changed files with 316 additions and 178 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
_build/
locales/**/*.mo
site/
.DS_Store
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# 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)" $(SPHINXOPTS) $(O)
18 changes: 0 additions & 18 deletions _docmap.md

This file was deleted.

64 changes: 64 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# 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.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = 'Omeka S end user manual'
copyright = '2021, Omeka Team'
author = 'Omeka Team'


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'myst_parser'
]

myst_heading_anchors = 3

source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
}

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = [
'_build',
'Thumbs.db',
'.DS_Store',
'README.md',
'style-guide.md',
'translation.md',
]


# -- 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 = 'sphinx_rtd_theme'

gettext_compact = False
4 changes: 2 additions & 2 deletions deploy
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
mkdocs build
rsync -rv --delete site/ /websites/omekaorg/www/s/docs/user-manual
make clean html
rsync -rv --delete _build/html /websites/omekaorg/www/s/docs/user-manual
27 changes: 0 additions & 27 deletions docs/accessibility.md

This file was deleted.

36 changes: 36 additions & 0 deletions docs/accessibility.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Accessibility Statement
=======================

The Omeka team is committed to making Omeka S an accessible option for building
collections and exhibits online. We are working to make the core code
accessible and will continue to make accessibility for persons with
disabilities a priority as we develop the code. Omeka strives to adhere to `W3C
web design standards <http://www.w3.org/standards/>`_ and to be compliant with
`Section 508 <http://www.section508.gov/>`_ of the Americans with Disabilities
Act (pdf).

For more information, please review the following reports:

* Omeka S version 3.x :download:`Accessibility Conformance Report, using VPAT 2.4 Revised International Standards <files/OmekaS3x_ACR.pdf>` (pdf), October 2020.
* Omeka S version 2.x :download:`Accessibility Conformance Report using VPAT version 2.0 <files/VPAT_OmekaS2-0-1.pdf>` (pdf), August 2019.
* Omeka S version 1.x :download:`Accessibility Conformance Report using VPAT version 1.1 <files/VPAT2.0-OmekaS1-1.pdf>` (pdf), April 2018.

The following statements apply to Omeka S version 1.0.1 and higher:

Front end (Public view)
-----------------------

The Omeka S themes produced by the Omeka team have the following features to improve accessibility:

* `ARIA <http://www.w3.org/WAI/intro/aria>`_ (Accessible Rich Internet Applications) landmarks for tabbing through page content, when not using a mouse or using a screen reader.
* Semantic HTML5 markup.

Please note that although the core code for Omeka S conform to the above standards, installations of Omeka S which have been customized or which are using non-RRCHNM modules and themes may lack some or all of these options. While we encourage developers to consider accessibility, we cannot guarantee that their code includes ARIA Landmarks, SkipNav, or other accessibility considerations.

Back end (Administrative view)
------------------------------

The administrative dashboard of Omeka S has the following features for accessibility:

* ARIA landmarks for screen readers on the Admin Dashboard, designating the header, navigation, main content, and footers.
* Semantic HTML5 markup.
2 changes: 1 addition & 1 deletion docs/admin/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ On this tab, create a new password. It must be entered twice, in both the New Pa

![Empty password reset fields for the user outreach](adminfiles/users_password.png)

To see the password requirements, click the arrow next to the New Password field. This will display a list of [requirements](../../configuration) if any have been configured.
To see the password requirements, click the arrow next to the New Password field. This will display a list of [requirements](../configuration) if any have been configured.

### API keys
Use this tab to generate an API key for the user. To generate one, you must provide a label for the key - this could be a date or the purpose of the key. Save the page to generate the key.
Expand Down
2 changes: 1 addition & 1 deletion docs/content/item-sets.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ By default, Omeka S will use the media from the first item added to an item set

![Thumbnail tab with no asset selected. The tab displays a message about thumbnail creation and a button to "select" an asset](contentfiles/itemset_thumb1.png)

The assets you select from and upload as thumbnails in this tab are the same as those created for [site logos](../../sites/site_theme/#settings-options).
The assets you select from and upload as thumbnails in this tab are the same as those created for [site logos](../sites/site_theme.md#settings-options).

To assign an asset as a thumbnail, click on the "Select" button in the main work area of the tab. This will open a drawer on the right side.

Expand Down
2 changes: 1 addition & 1 deletion docs/content/items.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ By default, Omeka S will use the topmost media to generate a thumbnail for the i

When you use an asset thumbnail instead of uploading media, the asset thumbnail does not display on the item's public show page. This makes such thumbnails useful for items which have no media but which would benefit from a thumbnail for the browse view, or for items whose media does not render an elegant thumbnail, such as audio or video files.

The assets you select from and upload as thumbnails in this tab are the same as those created for [site logos](../../sites/site_theme/#settings-options).
The assets you select from and upload as thumbnails in this tab are the same as those created for [site logos](../sites/site_theme.md#settings-options).

To assign an asset as a thumbnail, click on the Select button in the main work area of the tab. This will open a drawer on the right side.

Expand Down
4 changes: 2 additions & 2 deletions docs/content/media.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Media are displayed in a table. Each media is a row, with columns for:
Options for navigating and creating items display above the table of items:

- On the left side is a display for the number of pages of media, with forward and back arrows. The current page number is an editable field - enter any valid page number and hit return/enter on your keyboard to go to that page.
- In the center top is a button for [Advanced Search](../../search#media-advanced-search).
- In the center top is a button for [Advanced Search](../search.md#media-advanced-search).
- Just above the table on the right are options for sorting media, with two dropdown menus. The first lets you select between **Title**, **Class**, **Owner**, **(date) Created**, and **Size**; the second allows you to sort ascending or descending. To apply, click the "Sort" button.

Clicking on the title of any media will take you to its metadata page. This page displays any metadata in the main work area, with a sidebar on the right listing the visibility, associated item (an active link), date created, MIME type, Size, Ingester, Source, and links to the file derivatives.
Expand Down Expand Up @@ -57,7 +57,7 @@ To edit existing media, you can:
- Go to the Media browse page, click on the title to view the media's metadata and then click the "Edit media" button in the upper right hand corner
- Click on the media's name in the right-hand sidebar of an item's page to go to the media's metadata, and then click on "Edit media" from there.

Editing media is very similar to editing [items](../../content/items) or [item sets](../../content/item-sets).
Editing media is very similar to editing [items](../content/items) or [item sets](../content/item-sets).

![Edit media page, with no properties loaded](../content/contentfiles/media_edit.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/frontpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ If you want this index page to be hidden from site visitors, a Global Administra
- Under the "Default site" option, use the dropdown menu to select one of your current sites.
- To remove a selected site and revert back to the index page, click the small "X" on the right side of the dropdown.

You can customize a branded site index for your installation by creating a site, creating a page, and then using the ["List of sites" page block](sites/site_pages.md#page-blocks) to generate a list of all the sites in the installation. Then, use the "Default site" option to point to that site.
You can customize a branded site index for your installation by creating a site, creating a page, and then using the ["List of sites" page block](sites/site_pages.md#page-blocks) to generate a list of all the sites in the installation. Then, use the "Default site" option to point to that site.
24 changes: 0 additions & 24 deletions docs/index.md

This file was deleted.

8 changes: 4 additions & 4 deletions docs/modules/csvimport.md
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ The following are known errors that can occur during an import:
Some other modules add functionality to the CSV import process. If you have these modules installed and active, you will have access to the following options when using CSV Import.

### Mapping
If you have [Mapping](../mapping/) (minimum version 1.1.0) installed and active, you will have two additional options in the "Map to Omeka S data" tab when importing Items. Note that these options do not appear for any other import type, including Mixed Resources.
If you have [Mapping](mapping) (minimum version 1.1.0) installed and active, you will have two additional options in the "Map to Omeka S data" tab when importing Items. Note that these options do not appear for any other import type, including Mixed Resources.

![Add mapping drawer with additional options for "Resource location" and "default map view"](../modules/modulesfiles/csvimport_mapping1.png)

Expand All @@ -708,7 +708,7 @@ If you have [Mapping](../mapping/) (minimum version 1.1.0) installed and active,
- **Default zoom** must be a number between 1 (most zoomed out) and 18 (most zoomed in).

### File Sideload
If you have [File Sideload](../filesideload) (minimum version 1.2.0) installed and active, you can use it as a source for media when running a CSV import.
If you have [File Sideload](filesideload) (minimum version 1.2.0) installed and active, you can use it as a source for media when running a CSV import.

Everything on the **Map to Omeka S data** tab will be the same. When you add a mapping and choose the "Media source" option, you will see that there is now an option for "Sideload".

Expand All @@ -717,7 +717,7 @@ Everything on the **Map to Omeka S data** tab will be the same. When you add a m
For the data in this column, you need to include the full file name, including extension. So, for example, if you want to import a JPG file named "Jekyll_and_Hyde_Title", then the data in the media column of the CSV you are importing should be `Jekyll_and_Hyde_Title.jpg`.

### Numeric Data Types
If you have [Numeric Data Types](../numericdatatypes) installed and active, it will add the option to set a column data type as numeric data.
If you have [Numeric Data Types](numericdatatypes) installed and active, it will add the option to set a column data type as numeric data.

Options are:

Expand Down Expand Up @@ -756,4 +756,4 @@ Use the following formats for importing [durations](https://en.wikipedia.org/wik


### Custom Vocab
If you have [Custom Vocab](../customvocab) installed and active, it will add your custom vocabularies as data types in Omeka. You can select these data types during your CSV Import.
If you have [Custom Vocab](customvocab) installed and active, it will add your custom vocabularies as data types in Omeka. You can select these data types during your CSV Import.
2 changes: 1 addition & 1 deletion docs/modules/fedoraconnector.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ There are two options for configuring Fedora Connector, both of which enable the

The first checkbox offers the option to import the Fedora Vocabulary into your Omeka S install’s Vocabularies. The second checkbox offers the option to import the Linked Data Platform Vocabulary into your Omeka S install’s Vocabularies. If you do so, data in these vocabularies will also be imported into Omeka S.

You can check these boxes when you first install Fedora Connector, or at a later point via the "Configure" button in the [Modules](../modules/index.md#managing-modules) list.
You can check these boxes when you first install Fedora Connector, or at a later point via the "Configure" button in the [Modules](index) list.

## Import data
To use Fedora Connector, navigate to the section labelled "Fedora Connector" under Modules in the left-hand navigation of the admin dashboard. This will automatically take you to the Import page.
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/numericdatatypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Clicking on this dropdown will reveal multiple options, including all of the pro
![The contents of the dropdown, with the normal options in addition to eight properties using numeric data types.](../modules/modulesfiles/ndt-browsesort2.png)

## Bulk edit numeric data
The module adds an additional option to the [item batch edit](../../content/items/#batch-editing): Convert to Numeric.
The module adds an additional option to the [item batch edit](../content/items.md#batch-editing): Convert to Numeric.

The Convert to Numeric option lets you convert an existing text input property to a numeric data type. It will not work on properties where the data is currently an Omeka resource or a URI.

Expand Down
9 changes: 9 additions & 0 deletions docs/modules/scripto.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
=========
Scripto
=========

.. toctree::
:glob:
:maxdepth: 2

scripto/*
2 changes: 1 addition & 1 deletion docs/modules/scripto/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ To install Scripto, you must:
- be running Omeka S v2.0.0 or higher
- have a [MediaWiki](https://www.mediawiki.org/wiki/MediaWiki) installation running on the same server as the Omeka S installation. Minimum MediaWiki version is 1.30.0.

Create the MediaWiki installation on your server using [their instructions](https://www.mediawiki.org/wiki/Manual:FAQ#Installation_and_configuration). Install the Scripto module using the [documentation for installing modules](../../modules/#installing-modules).
Create the MediaWiki installation on your server using [their instructions](https://www.mediawiki.org/wiki/Manual:FAQ#Installation_and_configuration). Install the Scripto module using the [documentation for installing modules](../index.md#installing-modules).

Once you have installed the module and created your MediaWiki installation, go to the Modules tab of your Omeka S installation and activate the Scripto module.

Expand Down
Loading

0 comments on commit 7f32292

Please sign in to comment.