This commit is contained in:
Jari Voutilainen 2017-02-27 13:35:08 +02:00
commit f2e031af4f
10 changed files with 21 additions and 53 deletions

View File

@ -2,7 +2,7 @@
host = https://www.transifex.com host = https://www.transifex.com
[sixodp.ckanext-rating] [sixodp.ckanext-rating]
file_filter = i18n/<lang>/LC_MESSAGES/ckanext-rating.po file_filter = ckanext/rating/i18n/<lang>/LC_MESSAGES/ckanext-rating.po
source_file = i18n/ckanext-rating.pot source_file = ckanext/rating/i18n/ckanext-rating.pot
source_lang = en source_lang = en
type = PO type = PO

Binary file not shown.

View File

@ -10,7 +10,7 @@ msgstr ""
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2016-11-22 13:03+0000\n" "POT-Creation-Date: 2016-11-22 13:03+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Mikko Nieminen <mikko.nieminen@gofore.com>, 2016\n" "Last-Translator: Zharktas <jari-pekka.voutilainen@gofore.com>, 2017\n"
"Language-Team: Finnish (https://www.transifex.com/6aika-dataportal/teams/68018/fi/)\n" "Language-Team: Finnish (https://www.transifex.com/6aika-dataportal/teams/68018/fi/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n" "Content-Type: text/plain; charset=utf-8\n"
@ -21,28 +21,28 @@ msgstr ""
#: ckanext/rating/logic/action.py:29 #: ckanext/rating/logic/action.py:29
msgid "You must supply a package id or name (parameter \"package\")." msgid "You must supply a package id or name (parameter \"package\")."
msgstr "" msgstr "Sinun täytyy antaa tietoaineiston id tai nimi (parametri \"package\")."
#: ckanext/rating/logic/action.py:32 #: ckanext/rating/logic/action.py:32
msgid "You must supply a rating (parameter \"rating\")." msgid "You must supply a rating (parameter \"rating\")."
msgstr "" msgstr "Luokitus täytyy antaa (parametri \"rating\")."
#: ckanext/rating/logic/action.py:37 #: ckanext/rating/logic/action.py:37
msgid "Rating must be an integer value." msgid "Rating must be an integer value."
msgstr "" msgstr "Arvosanan on oltava numero"
#: ckanext/rating/logic/action.py:41 #: ckanext/rating/logic/action.py:41
#, python-format #, python-format
msgid "Rating must be between %i and %i." msgid "Rating must be between %i and %i."
msgstr "" msgstr "Arvosanan on oltava väliltä %i ja %i."
#: ckanext/rating/logic/action.py:44 #: ckanext/rating/logic/action.py:44
msgid "Not found" msgid "Not found"
msgstr "" msgstr "Ei löytynyt"
#: ckanext/rating/logic/action.py:59 #: ckanext/rating/logic/action.py:59
msgid "You must supply a package id (parameter \"package_id\")." msgid "You must supply a package id (parameter \"package_id\")."
msgstr "" msgstr "Sinun täytyy antaa tietoaineiston id (parametri \"package_id\")."
#: ckanext/rating/templates/package/snippets/info.html:23 #: ckanext/rating/templates/package/snippets/info.html:23
msgid "Rating" msgid "Rating"
@ -55,11 +55,11 @@ msgstr "Antamasi arvosana"
#: ckanext/rating/templates/package/snippets/info.html:43 #: ckanext/rating/templates/package/snippets/info.html:43
msgid "Followers" msgid "Followers"
msgstr "" msgstr "Seuraajat"
#: ckanext/rating/templates/rating/rating_description.html:10 #: ckanext/rating/templates/rating/rating_description.html:10
msgid "no rating given" msgid "no rating given"
msgstr "arvostelua ei annettu" msgstr "arvosanaa ei annettu"
#: ckanext/rating/templates/rating/rating_description.html:12 #: ckanext/rating/templates/rating/rating_description.html:12
msgid "bad" msgid "bad"
@ -88,38 +88,3 @@ msgstr "arvostelu"
#: ckanext/rating/templates/rating/stars_inactive.html:23 #: ckanext/rating/templates/rating/stars_inactive.html:23
msgid "ratings" msgid "ratings"
msgstr "arvostelua" msgstr "arvostelua"
#: ckanext/rating/templates/showcase/snippets/showcase_info.html:8
msgid "Submitted by"
msgstr ""
#: ckanext/rating/templates/showcase/snippets/showcase_info.html:26
msgid "Launch website"
msgstr ""
#: ckanext/rating/templates/showcase/snippets/showcase_item.html:19
msgid "This showcase has no description"
msgstr ""
#: ckanext/rating/templates/showcase/snippets/showcase_item.html:24
msgid "{num} Dataset"
msgid_plural "{num} Datasets"
msgstr[0] ""
msgstr[1] ""
#: ckanext/rating/templates/showcase/snippets/showcase_item.html:26
msgid "0 Datasets"
msgstr ""
#: ckanext/rating/templates/showcase/snippets/showcase_item.html:30
#: ckanext/rating/templates/showcase/snippets/showcase_item.html:31
msgid "View {showcase_title}"
msgstr ""
#: ckanext/rating/templates/showcase/snippets/showcase_item.html:35
msgid "Remove"
msgstr ""
#: ckanext/rating/templates/showcase/snippets/showcase_item.html:35
msgid "Remove dataset from this showcase"
msgstr ""

Binary file not shown.

View File

@ -8,6 +8,7 @@ from ckanext.rating.logic import action
from ckanext.rating import helpers from ckanext.rating import helpers
import ckanext.rating.logic.auth as rating_auth import ckanext.rating.logic.auth as rating_auth
from ckanext.rating.model import Rating from ckanext.rating.model import Rating
from ckan.lib.plugins import DefaultTranslation
def sort_by_rating(sort): def sort_by_rating(sort):
@ -46,12 +47,14 @@ def sort_by_rating(sort):
return q return q
class RatingPlugin(plugins.SingletonPlugin): class RatingPlugin(plugins.SingletonPlugin, DefaultTranslation):
plugins.implements(plugins.IConfigurer) plugins.implements(plugins.IConfigurer)
plugins.implements(plugins.IActions) plugins.implements(plugins.IActions)
plugins.implements(plugins.ITemplateHelpers) plugins.implements(plugins.ITemplateHelpers)
plugins.implements(plugins.IAuthFunctions) plugins.implements(plugins.IAuthFunctions)
plugins.implements(plugins.IRoutes, inherit=True) plugins.implements(plugins.IRoutes, inherit=True)
if toolkit.check_ckan_version(min_version='2.5.0'):
plugins.implements(plugins.ITranslation, inherit=True)
# IConfigurer # IConfigurer

View File

@ -1,21 +1,21 @@
[extract_messages] [extract_messages]
keywords = translate isPlural keywords = translate isPlural
add_comments = TRANSLATORS: add_comments = TRANSLATORS:
output_file = i18n/ckanext-rating.pot output_file = ckanext/rating/i18n/ckanext-rating.pot
width = 80 width = 80
[init_catalog] [init_catalog]
domain = ckanext-rating domain = ckanext-rating
input_file = i18n/ckanext-rating.pot input_file = ckanext/rating/i18n/ckanext-rating.pot
output_dir = i18n output_dir = ckanext/rating/i18n
[update_catalog] [update_catalog]
domain = ckanext-rating domain = ckanext-rating
input_file = i18n/ckanext-rating.pot input_file = ckanext/rating/i18n/ckanext-rating.pot
output_dir = i18n output_dir = ckanext/rating/i18n
previous = true previous = true
[compile_catalog] [compile_catalog]
domain = ckanext-rating domain = ckanext-rating
directory = i18n directory = ckanext/rating/i18n
statistics = true statistics = true