Skip to content

Commit

Permalink
Custom translation config
Browse files Browse the repository at this point in the history
  • Loading branch information
blagojabozinovski committed Feb 23, 2024
1 parent c37be5d commit 4fff08e
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 4 deletions.
19 changes: 19 additions & 0 deletions ckanext/iaea/i18n/ckanext-iaea.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Translations template for ckanext-iaea.
# Copyright (C) 2024 ORGANIZATION
# This file is distributed under the same license as the ckanext-iaea project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2024.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: ckanext-iaea 0.0.1\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2024-02-23 15:25+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"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.7.0\n"

Binary file added ckanext/iaea/i18n/fr/LC_MESSAGES/ckanext-iaea.mo
Binary file not shown.
21 changes: 21 additions & 0 deletions ckanext/iaea/i18n/fr/LC_MESSAGES/ckanext-iaea.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# French translations for ckanext-iaea.
# Copyright (C) 2024 ORGANIZATION
# This file is distributed under the same license as the ckanext-iaea
# project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2024.
#
msgid ""
msgstr ""
"Project-Id-Version: ckanext-iaea 0.0.1\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2024-02-23 15:25+0100\n"
"PO-Revision-Date: 2024-02-23 15:26+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: fr\n"
"Language-Team: fr <LL@li.org>\n"
"Plural-Forms: nplurals=2; plural=(n > 1)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.7.0\n"

9 changes: 5 additions & 4 deletions ckanext/iaea/plugin.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
from ckan.lib.plugins import DefaultTranslation


class IaeaPlugin(plugins.SingletonPlugin):
class IaeaPlugin(plugins.SingletonPlugin, DefaultTranslation):
plugins.implements(plugins.IConfigurer)
plugins.implements(plugins.ITranslation)

# IConfigurer

def update_config(self, config_):
toolkit.add_template_directory(config_, 'templates')
toolkit.add_public_directory(config_, 'public')
toolkit.add_resource('assets', 'iaea')
toolkit.add_template_directory(config_, "templates")
toolkit.add_public_directory(config_, "public")
toolkit.add_resource("assets", "iaea")

0 comments on commit 4fff08e

Please sign in to comment.