View | Details | Raw Unified | Return to bug 43731
Collapse All | Expand All

(-)ucs-school-l10n-fr/Makefile (-2 / +1 lines)
 Lines 36-45    Link Here 
36
build:
36
build:
37
37
38
include all_targets.mk
38
include all_targets.mk
39
ADDITIONAL = $(DESTDIR)/usr/share/locale/fr/LC_MESSAGES/ucs-school-ucr-l10n.mo
40
$(DESTDIR)/usr/share/locale/fr/LC_MESSAGES/ucs-school-ucr-l10n.mo: fr/ucs-school-ucr-l10n.po
39
$(DESTDIR)/usr/share/locale/fr/LC_MESSAGES/ucs-school-ucr-l10n.mo: fr/ucs-school-ucr-l10n.po
41
40
42
install: $(ALL_TARGETS) $(ADDITIONAL)
41
install: $(ALL_TARGETS)
43
42
44
%.mo:
43
%.mo:
45
	mkdir -p $(@D)
44
	mkdir -p $(@D)
(-)ucs-school-l10n-fr/conffiles/ucs-school-ucr-l10n-fr (-28 lines)
 Lines 1-28    Link Here 
1
#!/bin/sh
2
# Copyright 2016-2017 Univention GmbH
3
#
4
# http://www.univention.de/
5
#
6
# All rights reserved.
7
#
8
# The source code of this program is made available
9
# under the terms of the GNU Affero General Public License version 3
10
# (GNU AGPL V3) as published by the Free Software Foundation.
11
#
12
# Binary versions of this program provided by Univention to you as
13
# well as other copyrighted, protected or trademarked materials like
14
# Logos, graphics, fonts, specific documentations and configurations,
15
# cryptographic keys etc. are subject to a license agreement between
16
# you and Univention and not subject to the GNU AGPL V3.
17
#
18
# In the case you use this program under the terms of the GNU AGPL V3,
19
# the program is provided in the hope that it will be useful,
20
# but WITHOUT ANY WARRANTY; without even the implied warranty of
21
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
# GNU Affero General Public License for more details.
23
#
24
# You should have received a copy of the GNU Affero General Public
25
# License with the Debian GNU/Linux or Univention distribution in file
26
# /usr/share/common-licenses/AGPL-3; if not, see
27
# <http://www.gnu.org/licenses/>.
28
/usr/share/ucs-school-l10n-fr/ucs-school-ucr-l10n fr
(-)ucs-school-l10n-fr/debian/rules (-1 lines)
 Lines 28-34    Link Here 
28
# <http://www.gnu.org/licenses/>.
28
# <http://www.gnu.org/licenses/>.
29
29
30
override_dh_auto_install:
30
override_dh_auto_install:
31
	univention-install-config-registry
32
	dh_auto_install
31
	dh_auto_install
33
32
34
override_dh_auto_test:
33
override_dh_auto_test:
(-)ucs-school-l10n-fr/debian/ucs-school-l10n-fr.dirs (-1 lines)
 Lines 3-6    Link Here 
3
usr/share/univention-management-console-frontend/js/umc/help
3
usr/share/univention-management-console-frontend/js/umc/help
4
usr/share/univention-management-console/i18n/fr
4
usr/share/univention-management-console/i18n/fr
5
usr/share/locale/fr/LC_MESSAGES
5
usr/share/locale/fr/LC_MESSAGES
6
usr/share/ucs-school-l10-fr
(-)ucs-school-l10n-fr/debian/ucs-school-l10n-fr.install (-1 lines)
Line 1    Link Here 
1
ucs-school-ucr-l10n /usr/share/ucs-school-l10n-fr/
(-)ucs-school-l10n-fr/debian/ucs-school-l10n-fr.postinst (-6 lines)
 Lines 1-6    Link Here 
1
#!/bin/sh
2
#DEBHELPER#
3
4
/usr/share/ucs-school-l10n-fr/ucs-school-ucr-l10n fr
5
6
exit 0
(-)ucs-school-l10n-fr/debian/ucs-school-l10n-fr.univention-config-registry (-3 lines)
 Lines 1-3    Link Here 
1
Type: script
2
Script: ucs-school-ucr-l10n-fr
3
Variables: ucs/web/overview/entries/.*/(link|description|label)$
(-)ucs-school-l10n-fr/fr/ucs-school-ucr-l10n.po (-25 lines)
 Lines 1-25    Link Here 
1
msgid ""
2
msgstr ""
3
"Project-Id-Version: ucr\n"
4
"POT-Creation-Date: 2016-10-28 14:41+0000\n"
5
"Last-Translator: Alexander Kläser <klaeser@univention.de>\n"
6
"Language-Team: French <fr@bureau-cornavin.com>\n"
7
"Language: fr\n"
8
"PO-Revision-Date: 2016-10-28 16:52+0100\n"
9
"MIME-Version: 1.0\n"
10
"Content-Type: text/plain; charset=UTF-8\n"
11
"Content-Transfer-Encoding: 8bit\n"
12
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
13
"X-Generator: Lokalize 2.0\n"
14
15
#: ucs/web/overview/entries/service/teacherconsole/label
16
msgid "UCS@school"
17
msgstr "UCS@school"
18
19
#: ucs/web/overview/entries/service/teacherconsole/description
20
msgid "Access to the UCS@school modules in the Univention Management Console"
21
msgstr "Accès aux modules UCS@school dans Univention Management Console"
22
23
#: ucs/web/overview/entries/service/teacherconsole/link
24
msgid "/univention-management-console"
25
msgstr "/univention-management-console?lang=fr-FR"
(-)ucs-school-l10n-fr/ucs-school-ucr-l10n (-52 lines)
 Lines 1-52    Link Here 
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
#
4
# Copyright 2016-2017 Univention GmbH
5
#
6
# http://www.univention.de/
7
#
8
# All rights reserved.
9
#
10
# The source code of this program is made available
11
# under the terms of the GNU Affero General Public License version 3
12
# (GNU AGPL V3) as published by the Free Software Foundation.
13
#
14
# Binary versions of this program provided by Univention to you as
15
# well as other copyrighted, protected or trademarked materials like
16
# Logos, graphics, fonts, specific documentations and configurations,
17
# cryptographic keys etc. are subject to a license agreement between
18
# you and Univention and not subject to the GNU AGPL V3.
19
#
20
# In the case you use this program under the terms of the GNU AGPL V3,
21
# the program is provided in the hope that it will be useful,
22
# but WITHOUT ANY WARRANTY; without even the implied warranty of
23
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24
# GNU Affero General Public License for more details.
25
#
26
# You should have received a copy of the GNU Affero General Public
27
# License with the Debian GNU/Linux or Univention distribution in file
28
# /usr/share/common-licenses/AGPL-3; if not, see
29
# <http://www.gnu.org/licenses/>.
30
31
import argparse
32
import gettext
33
34
from univention.config_registry import ConfigRegistry
35
36
if __name__ == '__main__':
37
	parser = argparse.ArgumentParser()
38
	parser.add_argument('language_code',
39
						type=str,
40
						help="two char language code, e.g. 'fr'")
41
	args = parser.parse_args()
42
	gettext.translation('ucs-school-ucr-l10n', languages=[args.language_code]).install()
43
	ucr = ConfigRegistry()
44
	ucr.load()
45
	overview_ucrvs = {k: v for k, v in ucr.items() if 'ucs/web/overview/entries' in k}
46
	ucrvs_translated = {}
47
	for ucrv, value in overview_ucrvs.items():
48
		translation = _(value)
49
		if not translation == value:
50
			ucrvs_translated['{}/{}'.format(ucrv, args.language_code)] = translation
51
	ucr.update(ucrvs_translated)
52
	ucr.save()

Return to bug 43731