Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
user-manual
manual
Commits
8237819c
Commit
8237819c
authored
Jun 06, 2017
by
Glenn Walbran
Browse files
Enable image translations for 17.04
Also removes the old localeimages submodule which was never actually used
parent
3c543e84
Changes
5
Hide whitespace changes
Inline
Side-by-side
.gitmodules
View file @
8237819c
[submodule "
localeimages
"]
path =
localeimages
[submodule "
source/images-translated
"]
path =
source/images-translated
url = https://git.mahara.org/user-manual/manual-images.git
branch = 17.04_STABLE
Makefile
View file @
8237819c
...
...
@@ -51,6 +51,10 @@ update:
fetchtranslations
:
/bin/bash generate-mo-files.sh
$(MAHARA)
#Delete translated images submodule, then init/update it from remote
-
rm
-rf
source
/images-translated
#Update/init/remote to effective clone from HEAD
-
git submodule update
--init
--remote
source
/images-translated
preview
:
$(SPHINXBUILD)
-a
-D
language
=
en
-b
html
$(ALLSPHINXOPTS)
$(BUILDDIR)
/html/en/
$(MAHARA)
...
...
localeimages
@
af4a16dc
Compare
af4a16dc
...
af4a16dc
Subproject commit af4a16dcedf47c653aa680c9208d8f4443ac63bd
source/conf.py
View file @
8237819c
...
...
@@ -28,16 +28,14 @@ needs_sphinx = '1.4'
gettext_additional_targets
=
[
'image'
,
'figure'
]
# NOTE:
# figure_language_filename can't be changed from the default in reality, since
# {root} is the full filesystem path of the image file, not the relative path.
# Don't ask me why. The only real option for images is to be, for example:
# This image translation only works for images/figures that are specified as
# [<filepath>/]<filename>.*
#
#
images/foo.de.png
#
That is you cannot specify the file extension for image translations to work.
#
# The problem with that is when you specify images/foo.* as your image file in
# a figure directive, Sphinx will find both images/foo.png and images/foo.de.png
# and pick the first one, which is often wrong (especially if it's the en build).
figure_language_filename
=
"{root}.{language}{ext}"
# This is because of an oddity in the Sphinx asset collection. Hopefully this
# will change in the future.
figure_language_filename
=
"/images-translated/{language}{root}{ext}"
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
...
...
images-translated
@
147849e2
Subproject commit 147849e2bf1a74efeae6af59052cb4b7b69d4b2a
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment