-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
59 lines (37 loc) · 1.76 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
===========
3D Bureau
===========
Does nothing yet.
This plugin is licensed under the GNU APGL v3+.
Installation
============
If you've checked out this plugin and mediagoblin in the same parent
directory, you should be able to build and install with
../mediagoblin/bin/python setup.py build
../mediagoblin/bin/python setup.py install
Tests
=====
After installing, run the built-in unit tests by invoking `python2
setup.py test` in the root directory. The tests require an installed
version of GNU MediaGoblin to be available for importing. If you've
checked out this plugin and mediagoblin in the same parent directory,
you should be able to run
../mediagoblin/bin/python setup.py test
Updating gettext
================
To create/update the English .pot template file from the translatable
strings in the source code:
../mediagoblin/bin/pybabel extract -F babel.ini -o mediagoblin_3dbureau/i18n/en/LC_MESSAGES/mediagoblin_3dbureau.pot .
To create a new .po file for language "nn_NO":
../mediagoblin/bin/pybabel init -D mediagoblin_3dbureau -i mediagoblin_3dbureau/i18n/en/LC_MESSAGES/mediagoblin_3dbureau.pot -d mediagoblin_3dbureau/i18n/ -l nn_NO
To compile translated .po files into installable .mo files:
../mediagoblin/bin/pybabel compile -D mediagoblin_3dbureau -d mediagoblin_3dbureau/i18n/
To update previously created .po files with new messages after the
.pot file changed:
../mediagoblin/bin/pybabel update -D mediagoblin_3dbureau -i mediagoblin_3dbureau/i18n/en/LC_MESSAGES/mediagoblin_3dbureau.pot -d mediagoblin_3dbureau/i18n/
TODO
====
* Make it actually work.
* Make translations usable by mediagoblin. A hook in
template.get_jinja_env that appends gettext_callables? Or
mediagoblin could look in some standard path for all plugins.