Commit 28db65de authored by Ubbo Veentjer's avatar Ubbo Veentjer
Browse files

i18n in place, startpage text

closes #1
parent 83f49e39
Pipeline #127541 passed with stage
in 2 minutes and 47 seconds
......@@ -11,11 +11,11 @@ list running containers
enter running container
docker exec -it plan-git_django_1 bash
docker exec -it plan_django_1 bash
logs
docker logs rdmo_django_1
docker logs plan_django_1
## compose
......@@ -25,7 +25,7 @@ build images:
run container:
docker-compose build
docker-compose up
create super-user (on first run)
......@@ -44,37 +44,26 @@ Additional commands have to be run on first setup or on upgrades
docker exec -it rdmo_django_1 python3 manage.py createsuperuser
# Development
## Translation
# Usage (without docker - old)
Clone the repo next to the rdmo-app dir and add symbolic links
git clone git@gitlab.gwdg.de:era/plan.git rdmo-era-mod
cd rdmo-app
ln -s ../rdmo-era-mod/locale/ .
ln -s ../rdmo-era-mod/theme/ .
Collect strings from modified templates:
# Translation
To collect strings from modified templates:
./manage.py makemessages -l de -l en --symlinks --ignore "env/*"
docker exec plan_django_1 python3 manage.py makemessages -l de -l en
to compile changes messages
./manage.py compilemessages -l de -l en
docker exec plan_django_1 python3 manage.py compilemessages -l de -l en
# Test
### old translation test stuff, TODO: test and dockerize
pip install Babel
pip install django-babel
pybabel extract theme/templates/ env/lib/python3.6/site-packages/rdmo/projects/ -o locale/en/LC_MESSAGES/django.po -F ../rdmo-era-mod/babel.cfg
# with pybabel
#### with pybabel
sudo apt install python3-django-babel
......
......@@ -5,6 +5,7 @@ RUN apt update -y && apt upgrade -y && apt install -y \
python3 \
python3-dev \
python3-pip \
gettext \
git
......
......@@ -29,7 +29,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*
#COPY ./theme /app/theme
COPY ./theme /app/theme
COPY ./locale /app/locale
COPY ./config/production.py /app/config/settings/local.py
......
......@@ -261,3 +261,7 @@ VENDOR_CDN = False
THEME_DIR = os.path.join(BASE_DIR, 'theme')
LOCALE_PATHS = (
os.path.join(BASE_DIR, 'locale'),
)
......@@ -147,7 +147,7 @@ Theme, see also:
http://rdmo.readthedocs.io/en/latest/configuration/themes.html
'''
# THEME_DIR = os.path.join(BASE_DIR, 'theme')
THEME_DIR = os.path.join(BASE_DIR, 'theme')
'''
Export Formats
......@@ -338,5 +338,7 @@ LOGGING = {
VENDOR_CDN = False
#THEME_DIR = os.path.join(BASE_DIR, 'theme')
LOCALE_PATHS = (
os.path.join(BASE_DIR, 'locale'),
)
......@@ -15,6 +15,7 @@ services:
- postgres
volumes:
- ./theme:/app/theme
- ./locale:/app/locale
env_file:
- ./.envs/.django
- ./.envs/.postgres
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-23 11:49+0100\n"
"POT-Creation-Date: 2020-03-11 22:27+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -37,65 +37,81 @@ msgstr ""
msgid "Contact"
msgstr ""
#: theme/templates/core/base_navigation.html:29
#: theme/templates/core/base_navigation.html:30
msgid "Management"
msgstr ""
#: theme/templates/core/base_navigation.html:34
#: theme/templates/core/base_navigation.html:35
#: theme/templates/core/base_navigation.html:55
msgid "Questions"
msgstr ""
#: theme/templates/core/base_navigation.html:40
msgid "Domain"
msgstr ""
#: theme/templates/core/base_navigation.html:39
#: theme/templates/core/base_navigation.html:45
#: theme/templates/projects/project_detail.html:8
#: theme/templates/projects/projects.html:15
msgid "Options"
msgstr ""
#: theme/templates/core/base_navigation.html:44
#: theme/templates/core/base_navigation.html:50
msgid "Conditions"
msgstr ""
#: theme/templates/core/base_navigation.html:49
msgid "Questions"
msgstr ""
#: theme/templates/core/base_navigation.html:54
#: theme/templates/core/base_navigation.html:60
msgid "Tasks"
msgstr ""
#: theme/templates/core/base_navigation.html:59
#: theme/templates/core/base_navigation.html:65
msgid "Views"
msgstr ""
#: theme/templates/core/base_navigation.html:67
#: theme/templates/core/base_navigation.html:73
msgid "Admin"
msgstr ""
#: theme/templates/core/base_navigation.html:80
#: theme/templates/core/base_navigation.html:86
msgid "Language"
msgstr ""
#: theme/templates/core/base_navigation.html:94
#: theme/templates/core/base_navigation.html:102
msgid "About RDMO"
msgstr ""
#: theme/templates/core/base_navigation.html:111
msgid "Update profile"
msgstr ""
#: theme/templates/core/base_navigation.html:116
#: theme/templates/core/base_navigation.html:133
msgid "Logout"
msgstr ""
#: theme/templates/core/base_navigation.html:127
#: theme/templates/core/base_navigation.html:144
#: theme/templates/core/home.html:60
msgid "Login"
msgstr ""
#: theme/templates/core/home.html:42
msgid ""
"A tool to support the planning, implementation, and organisation of research "
"data management. Powered by RDMO."
msgstr ""
"Ein Werkzeug zur Planung, Implementierung und Organisation von "
"Forschungsdatenmanagement. Unterstützt durch RDMO."
#: theme/templates/projects/project_detail.html:12
msgid "Answer questions"
msgstr "Fragebogen ausfüllen"
#: theme/templates/projects/project_detail.html:18
#: theme/templates/projects/project_detail_snapshots.html:32
msgid "View answers"
msgstr "Fragebogen ansehen"
#: theme/templates/projects/project_detail.html:26
#: theme/templates/projects/project_detail_snapshots.html:58
msgid "Create snapshot"
msgstr ""
......@@ -108,6 +124,7 @@ msgid "Delete project"
msgstr ""
#: theme/templates/projects/project_detail.html:52
#: theme/templates/projects/project_detail_memberships.html:46
msgid "Add member"
msgstr ""
......@@ -119,51 +136,82 @@ msgstr ""
msgid "Back to projects overview"
msgstr ""
#: theme/templates/projects/project_detail.html:78
#: theme/templates/projects/project_detail.html:80
#: theme/templates/projects/projects.html:63
msgid "Fill in Questionaire"
msgstr "Fragebogen ausfüllen"
#: theme/templates/projects/project_detail.html:80
#: theme/templates/projects/project_detail.html:83
#: theme/templates/projects/project_detail_snapshots.html:14
msgid "Description"
msgstr ""
#: theme/templates/projects/project_detail.html:88
#: theme/templates/projects/project_detail.html:91
msgid "No description available."
msgstr ""
#: theme/templates/projects/project_form.html:9
#: theme/templates/projects/project_form.html:11
msgid "Update project"
#: theme/templates/projects/project_detail_memberships.html:8
msgid "Members"
msgstr ""
#: theme/templates/projects/project_form.html:15
#: theme/templates/projects/project_form.html:17
#: theme/templates/projects/projects.html:19
#: theme/templates/projects/projects.html:75
msgid "Add new project"
msgstr "Neues Projekt hinzufügen"
#: theme/templates/projects/project_detail_memberships.html:12
msgid "User"
msgstr ""
#: theme/templates/projects/project_questions.html:41
msgid "Questionnaire for project <em>{$ service.project.title $}</em>"
msgstr "Fragebogen für Projekt <em>{$ service.project.title $}</em>"
#: theme/templates/projects/project_detail_memberships.html:13
msgid "E-Mail"
msgstr ""
#: theme/templates/projects/project_questions.html:70
msgid "Save"
#: theme/templates/projects/project_detail_memberships.html:14
#: theme/templates/projects/projects.html:41
msgid "Role"
msgstr ""
#: theme/templates/projects/project_detail_memberships.html:31
msgid "Update membership"
msgstr ""
#: theme/templates/projects/project_questions.html:73
msgid "Save and proceed"
#: theme/templates/projects/project_detail_memberships.html:36
msgid "Delete membership"
msgstr ""
#: theme/templates/projects/project_questions.html:79
msgid "Back"
#: theme/templates/projects/project_detail_snapshots.html:7
msgid "Snapshots"
msgstr ""
#: theme/templates/projects/project_questions.html:82
msgid "Skip"
#: theme/templates/projects/project_detail_snapshots.html:13
msgid "Snapshot"
msgstr ""
#: theme/templates/projects/project_detail_snapshots.html:15
#: theme/templates/projects/projects.html:42
msgid "Created"
msgstr ""
#: theme/templates/projects/project_detail_snapshots.html:36
msgid "Update snapshot"
msgstr ""
#: theme/templates/projects/project_detail_snapshots.html:41
msgid "Rollback to snapshot"
msgstr ""
#: theme/templates/projects/project_detail_snapshots.html:52
msgid "No snapshots found."
msgstr ""
#: theme/templates/projects/project_form.html:9
#: theme/templates/projects/project_form.html:11
msgid "Update project"
msgstr ""
#: theme/templates/projects/project_form.html:15
#: theme/templates/projects/project_form.html:17
#: theme/templates/projects/projects.html:19
#: theme/templates/projects/projects.html:75
msgid "Add new project"
msgstr "Neues Projekt hinzufügen"
#: theme/templates/projects/project_questions_sidebar.html:4
msgid "Progress"
msgstr ""
......@@ -172,23 +220,23 @@ msgstr ""
msgid "Overview"
msgstr ""
#: theme/templates/projects/project_questions_sidebar.html:41
#: theme/templates/projects/project_questions_sidebar.html:34
msgid "Navigation"
msgstr ""
#: theme/templates/projects/project_questions_sidebar.html:44
#: theme/templates/projects/project_questions_sidebar.html:37
msgid "Please note that using the navigation will discard any usaved input."
msgstr ""
#: theme/templates/projects/project_questions_sidebar.html:50
#: theme/templates/projects/project_questions_sidebar.html:43
msgid "skip to previous page"
msgstr ""
#: theme/templates/projects/project_questions_sidebar.html:55
#: theme/templates/projects/project_questions_sidebar.html:48
msgid "skip to next page"
msgstr ""
#: theme/templates/projects/project_questions_sidebar.html:62
#: theme/templates/projects/project_questions_sidebar.html:55
msgid "Back to project overview"
msgstr ""
......@@ -212,14 +260,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: theme/templates/projects/projects.html:41
msgid "Role"
msgstr ""
#: theme/templates/projects/projects.html:42
msgid "Created"
msgstr ""
#: theme/templates/projects/projects.html:43
msgid "Template"
msgstr ""
......@@ -236,3 +276,6 @@ msgstr "Projekteinstellungen bearbeiten"
#: theme/templates/projects/projects.html:66
msgid "Delete Project"
msgstr "Projekt löschen"
#~ msgid "Questionnaire for project <em>{$ service.project.title $}</em>"
#~ msgstr "Fragebogen für Projekt <em>{$ service.project.title $}</em>"
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-23 11:49+0100\n"
"POT-Creation-Date: 2020-03-11 22:27+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -36,65 +36,79 @@ msgstr ""
msgid "Contact"
msgstr ""
#: theme/templates/core/base_navigation.html:29
#: theme/templates/core/base_navigation.html:30
msgid "Management"
msgstr ""
#: theme/templates/core/base_navigation.html:34
#: theme/templates/core/base_navigation.html:35
#: theme/templates/core/base_navigation.html:55
msgid "Questions"
msgstr ""
#: theme/templates/core/base_navigation.html:40
msgid "Domain"
msgstr ""
#: theme/templates/core/base_navigation.html:39
#: theme/templates/core/base_navigation.html:45
#: theme/templates/projects/project_detail.html:8
#: theme/templates/projects/projects.html:15
msgid "Options"
msgstr ""
#: theme/templates/core/base_navigation.html:44
#: theme/templates/core/base_navigation.html:50
msgid "Conditions"
msgstr ""
#: theme/templates/core/base_navigation.html:49
msgid "Questions"
msgstr ""
#: theme/templates/core/base_navigation.html:54
#: theme/templates/core/base_navigation.html:60
msgid "Tasks"
msgstr ""
#: theme/templates/core/base_navigation.html:59
#: theme/templates/core/base_navigation.html:65
msgid "Views"
msgstr ""
#: theme/templates/core/base_navigation.html:67
#: theme/templates/core/base_navigation.html:73
msgid "Admin"
msgstr ""
#: theme/templates/core/base_navigation.html:80
#: theme/templates/core/base_navigation.html:86
msgid "Language"
msgstr ""
#: theme/templates/core/base_navigation.html:94
#: theme/templates/core/base_navigation.html:102
msgid "About RDMO"
msgstr ""
#: theme/templates/core/base_navigation.html:111
msgid "Update profile"
msgstr ""
#: theme/templates/core/base_navigation.html:116
#: theme/templates/core/base_navigation.html:133
msgid "Logout"
msgstr ""
#: theme/templates/core/base_navigation.html:127
#: theme/templates/core/base_navigation.html:144
#: theme/templates/core/home.html:60
msgid "Login"
msgstr ""
#: theme/templates/core/home.html:42
msgid ""
"A tool to support the planning, implementation, and organisation of research "
"data management. Powered by RDMO."
msgstr ""
#: theme/templates/projects/project_detail.html:12
msgid "Answer questions"
msgstr "Fill in Questionaire"
#: theme/templates/projects/project_detail.html:18
#: theme/templates/projects/project_detail_snapshots.html:32
msgid "View answers"
msgstr "View Questionaire"
#: theme/templates/projects/project_detail.html:26
#: theme/templates/projects/project_detail_snapshots.html:58
msgid "Create snapshot"
msgstr ""
......@@ -107,6 +121,7 @@ msgid "Delete project"
msgstr ""
#: theme/templates/projects/project_detail.html:52
#: theme/templates/projects/project_detail_memberships.html:46
msgid "Add member"
msgstr ""
......@@ -118,49 +133,80 @@ msgstr ""
msgid "Back to projects overview"
msgstr ""
#: theme/templates/projects/project_detail.html:78
#: theme/templates/projects/project_detail.html:80
#: theme/templates/projects/projects.html:63
msgid "Fill in Questionaire"
msgstr "Fragebogen ausfüllen"
#: theme/templates/projects/project_detail.html:80
#: theme/templates/projects/project_detail.html:83
#: theme/templates/projects/project_detail_snapshots.html:14
msgid "Description"
msgstr ""
#: theme/templates/projects/project_detail.html:88
#: theme/templates/projects/project_detail.html:91
msgid "No description available."
msgstr ""
#: theme/templates/projects/project_form.html:9
#: theme/templates/projects/project_form.html:11
msgid "Update project"
#: theme/templates/projects/project_detail_memberships.html:8
msgid "Members"
msgstr ""
#: theme/templates/projects/project_form.html:15
#: theme/templates/projects/project_form.html:17
#: theme/templates/projects/projects.html:19
#: theme/templates/projects/projects.html:75
msgid "Add new project"
#: theme/templates/projects/project_detail_memberships.html:12
msgid "User"
msgstr ""
#: theme/templates/projects/project_detail_memberships.html:13
msgid "E-Mail"
msgstr ""
#: theme/templates/projects/project_questions.html:41
msgid "Questionnaire for project <em>{$ service.project.title $}</em>"
#: theme/templates/projects/project_detail_memberships.html:14
#: theme/templates/projects/projects.html:41
msgid "Role"
msgstr ""
#: theme/templates/projects/project_questions.html:70
msgid "Save"
#: theme/templates/projects/project_detail_memberships.html:31
msgid "Update membership"
msgstr ""
#: theme/templates/projects/project_questions.html:73
msgid "Save and proceed"
#: theme/templates/projects/project_detail_memberships.html:36
msgid "Delete membership"
msgstr ""
#: theme/templates/projects/project_questions.html:79
msgid "Back"
#: theme/templates/projects/project_detail_snapshots.html:7
msgid "Snapshots"
msgstr ""
#: theme/templates/projects/project_questions.html:82
msgid "Skip"
#: theme/templates/projects/project_detail_snapshots.html:13
msgid "Snapshot"
msgstr ""
#: theme/templates/projects/project_detail_snapshots.html:15
#: theme/templates/projects/projects.html:42
msgid "Created"
msgstr ""
#: theme/templates/projects/project_detail_snapshots.html:36
msgid "Update snapshot"
msgstr ""
#: theme/templates/projects/project_detail_snapshots.html:41
msgid "Rollback to snapshot"
msgstr ""
#: theme/templates/projects/project_detail_snapshots.html:52
msgid "No snapshots found."
msgstr ""
#: theme/templates/projects/project_form.html:9
#: theme/templates/projects/project_form.html:11
msgid "Update project"
msgstr ""
#: theme/templates/projects/project_form.html:15
#: theme/templates/projects/project_form.html:17
#: theme/templates/projects/projects.html:19
#: theme/templates/projects/projects.html:75
msgid "Add new project"
msgstr ""
#: theme/templates/projects/project_questions_sidebar.html:4
......@@ -171,23 +217,23 @@ msgstr ""
msgid "Overview"
msgstr ""
#: theme/templates/projects/project_questions_sidebar.html:41
#: theme/templates/projects/project_questions_sidebar.html:34
msgid "Navigation"
msgstr ""
#: theme/templates/projects/project_questions_sidebar.html:44
#: theme/templates/projects/project_questions_sidebar.html:37
msgid "Please note that using the navigation will discard any usaved input."
msgstr ""
#: theme/templates/projects/project_questions_sidebar.html:50
#: theme/templates/projects/project_questions_sidebar.html:43
msgid "skip to previous page"
msgstr ""
#: theme/templates/projects/project_questions_sidebar.html:55
#: theme/templates/projects/project_questions_sidebar.html:48
msgid "skip to next page"
msgstr ""
#: theme/templates/projects/project_questions_sidebar.html:62
#: theme/templates/projects/project_questions_sidebar.html:55
msgid "Back to project overview"
msgstr ""
......@@ -211,14 +257,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: theme/templates/projects/projects.html:41
msgid "Role"
msgstr ""
#: theme/templates/projects/projects.html:42
msgid "Created"
msgstr ""
#: theme/templates/projects/projects.html:43
msgid "Template"
msgstr ""
......
{% extends 'core/base.html' %}
{% load i18n compress staticfiles core_tags %}