Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation settings #12

Merged
merged 1 commit into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions ckanext/kepa/kepa_dataset_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ dataset_fields:
validators: ignore_missing unicode_safe package_version_validator
form_placeholder: '1.0'

- field_name: separator
display_snippet: separator.html
label: Test Separator

- field_name: author
label: Author
form_placeholder: Joe Bloggs
Expand All @@ -63,40 +59,6 @@ dataset_fields:
label: Organization
preset: dataset_organization

- field_name: citation
label: Citation
repeating_subfields:
- field_name: originator
label: Originator
preset: multiple_text
form_blanks: 3
required: true
- field_name: publication_date
label: Publication Date
preset: date
- field_name: online_linkage
label: Online Linkage
preset: multiple_text
form_blanks: 2

- field_name: contact_address
label: Contact Address
repeating_subfields:
- field_name: address
label: Address
required: true
- field_name: city
label: City
- field_name: state
label: State
- field_name: postal_code
label: Postal Code
- field_name: country
label: Country

- field_name: separator
display_snippet: separator.html
label: Test Separator


- field_name: maintainer
Expand Down
8 changes: 4 additions & 4 deletions ckanext/kepa/plugin.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
from ckan.lib.plugins import DefaultTranslation


class KepaPlugin(plugins.SingletonPlugin):
class KepaPlugin(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", "kepa")



2 changes: 1 addition & 1 deletion ckanext/kepa/templates/home/snippets/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="search-container">
<div>
<form class="module-content search-form" method="get" action="{% url_for dataset_type ~ '.search' %}">
<h3 class="heading">{{ _("Search and explore data from Kosovo") }}</h3>
<h3 class="heading">{{ _('Search and explore data from Kosovo') }}</h3>
<div class="search-input form-group search-giant">
<input
aria-label="{% block header_site_search_label %}{{ h.humanize_entity_type('package', dataset_type, 'search placeholder') or _('Search datasets') }}{% endblock %}"
Expand Down
Loading