Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Internationalization i18n, Polish translation #14
- Loading branch information
1 parent
dd499d0
commit 06bbd10
Showing
10 changed files
with
303 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
*.egg-info | ||
*.swp | ||
*.swo | ||
|
||
ckanext/report/i18n/_reused_translations.pot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Extraction from Python source files | ||
[python: **.py] | ||
# Extraction from Genshi HTML and text templates | ||
[jinja2: **/templates/**.html] | ||
encoding = utf-8 | ||
extensions = | ||
jinja2.ext.do, | ||
jinja2.ext.i18n, | ||
jinja2.ext.with_, | ||
ckan.lib.jinja_extensions.CkanExtend, | ||
ckan.lib.jinja_extensions.CkanInternationalizationExtension, | ||
ckan.lib.jinja_extensions.LinkForExtension, | ||
ckan.lib.jinja_extensions.ResourceExtension, | ||
ckan.lib.jinja_extensions.SnippetExtension, | ||
ckan.lib.jinja_extensions.UrlForExtension, | ||
ckan.lib.jinja_extensions.UrlForStaticExtension |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
# #-#-#-#-# ckanext-report.pot (ckanext-report 0.1) #-#-#-#-# | ||
# Translations template for ckanext-report. | ||
# Copyright (C) 2017 ORGANIZATION | ||
# This file is distributed under the same license as the ckanext-report project. | ||
# | ||
msgid "" | ||
msgstr "" | ||
"#-#-#-#-# ckanext-report.pot (ckanext-report 0.1) #-#-#-#-#\n" | ||
"Project-Id-Version: ckanext-report 0.1\n" | ||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" | ||
"POT-Creation-Date: 2017-03-20 17:01+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 0.9.6\n" | ||
|
||
#: ckanext/report/templates/report/index.html:3 | ||
#: ckanext/report/templates/report/index.html:6 | ||
#: ckanext/report/templates/report/view.html:3 | ||
#: ckanext/report/templates/report/view.html:6 | ||
msgid "Reports" | ||
msgstr "" | ||
|
||
#: ckanext/report/templates/report/index.html:26 | ||
msgid "View Report" | ||
msgstr "" | ||
|
||
#: ckanext/report/templates/report/option_include_sub_organizations.html:9 | ||
msgid "Include results from sub-organizations" | ||
msgstr "" | ||
|
||
#: ckanext/report/templates/report/option_organization.html:12 | ||
#: ckanext/report/templates/report/option_organization.html:16 | ||
msgid "Index of all organizations" | ||
msgstr "" | ||
|
||
#: ckanext/report/templates/report/tagless-datasets.html:8 | ||
msgid "Datasets without tags" | ||
msgstr "" | ||
|
||
#: ckanext/report/templates/report/tagless-datasets.html:9 | ||
msgid "Average tags per package" | ||
msgstr "" | ||
|
||
#: ckanext/report/templates/report/tagless-datasets.html:16 | ||
msgid "Notes" | ||
msgstr "" | ||
|
||
#: ckanext/report/templates/report/view.html:14 | ||
msgid "Generated" | ||
msgstr "" | ||
|
||
#: ckanext/report/templates/report/view.html:23 | ||
msgid "" | ||
"As a system administrator you are able to refresh this report on demand by " | ||
"clicking the 'Refresh' button." | ||
msgstr "" | ||
|
||
#: ckanext/report/templates/report/view.html:29 | ||
msgid "Options" | ||
msgstr "" | ||
|
||
#: ckanext/report/templates/report/view.html:50 | ||
msgid "Results" | ||
msgstr "" | ||
|
||
#: ckanext/report/templates/report/view.html:52 | ||
msgid "No results found." | ||
msgstr "" | ||
|
||
#: ckan/logic/converters.py:119 ckan/logic/validators.py:206 | ||
#: ckan/logic/validators.py:223 ckan/logic/validators.py:719 | ||
#: ckan/templates/group/members.html:17 | ||
#: ckan/templates/organization/members.html:17 | ||
#: ckanext/stats/templates/ckanext/stats/index.html:156 | ||
msgid "User" | ||
msgstr "" | ||
|
||
#: ckan/logic/converters.py:144 ckan/logic/validators.py:141 | ||
#: ckan/logic/validators.py:183 ckan/templates/package/read_base.html:24 | ||
#: ckanext/stats/templates/ckanext/stats/index.html:89 | ||
#: ckanext/stats/templates_legacy/ckanext/stats/index.html:65 | ||
#: ckanext/stats/templates_legacy/ckanext/stats/index.html:74 | ||
msgid "Dataset" | ||
msgstr "" | ||
|
||
#: ckan/templates/package/resource_read.html:43 | ||
#: ckan/templates/package/snippets/resource_item.html:45 | ||
msgid "Download" | ||
msgstr "" | ||
|
||
#: ckan/templates/package/resource_read.html:161 | ||
#: ckan/templates/package/snippets/additional_info.html:68 | ||
msgid "Created" | ||
msgstr "" | ||
|
||
#: ckan/templates/package/snippets/package_basic_fields.html:69 | ||
#: ckan/templates/snippets/organization.html:23 | ||
msgid "Organization" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Polish translations for ckanext-report. | ||
# Copyright (C) 2017 ORGANIZATION | ||
# This file is distributed under the same license as the ckanext-report | ||
# project. | ||
# Krzysztof Madejski <krzysztof.madejski@epf.org.pl>, 2017. | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: PROJECT VERSION\n" | ||
"Report-Msgid-Bugs-To: krzysztof.madejski@epf.org.pl\n" | ||
"POT-Creation-Date: 2017-03-20 17:02+0100\n" | ||
"PO-Revision-Date: 2017-03-20 17:02+0100\n" | ||
"Last-Translator: Krzysztof Madejski <krzysztof.madejski@epf.org.pl>\n" | ||
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && " | ||
"(n%100<10 || n%100>=20) ? 1 : 2)\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=utf-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Generated-By: Babel 0.9.6\n" | ||
|
||
#: ckanext/report/templates/report/index.html:3 | ||
#: ckanext/report/templates/report/index.html:6 | ||
#: ckanext/report/templates/report/view.html:3 | ||
#: ckanext/report/templates/report/view.html:6 | ||
msgid "Reports" | ||
msgstr "Raporty" | ||
|
||
#: ckanext/report/templates/report/index.html:26 | ||
msgid "View Report" | ||
msgstr "Zobacz Raport" | ||
|
||
#: ckanext/report/templates/report/option_include_sub_organizations.html:9 | ||
msgid "Include results from sub-organizations" | ||
msgstr "Dołącz wyniki od sub-organizacji" | ||
|
||
#: ckanext/report/templates/report/option_organization.html:12 | ||
#: ckanext/report/templates/report/option_organization.html:16 | ||
msgid "Index of all organizations" | ||
msgstr "Wszystkie organizacje" | ||
|
||
#: ckanext/report/templates/report/tagless-datasets.html:8 | ||
msgid "Datasets without tags" | ||
msgstr "Zbiory bez słów kluczowych" | ||
|
||
#: ckanext/report/templates/report/tagless-datasets.html:9 | ||
msgid "Average tags per package" | ||
msgstr "Średnia ilość słów kluczowych na zbiór" | ||
|
||
#: ckanext/report/templates/report/tagless-datasets.html:16 | ||
msgid "Notes" | ||
msgstr "Notatki" | ||
|
||
#: ckanext/report/templates/report/view.html:14 | ||
msgid "Generated" | ||
msgstr "Wygenerowany" | ||
|
||
#: ckanext/report/templates/report/view.html:23 | ||
msgid "" | ||
"As a system administrator you are able to refresh this report on demand " | ||
"by clicking the 'Refresh' button." | ||
msgstr "" | ||
"Jako administrator możesz odświeżyć ten raport na żądanie " | ||
"poprzez kliknięcie przycisku odśwież 'Refresh'." | ||
|
||
#: ckanext/report/templates/report/view.html:29 | ||
msgid "Options" | ||
msgstr "Opcje" | ||
|
||
#: ckanext/report/templates/report/view.html:50 | ||
msgid "Results" | ||
msgstr "Wyniki" | ||
|
||
#: ckanext/report/templates/report/view.html:52 | ||
msgid "No results found." | ||
msgstr "Nie znaleziono wyników" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/bin/bash | ||
|
||
# When you copy templates from CKAN (or other plugins) you end up with already translated translations in your pot file. | ||
# This script filters them out from your .pot file. Run it right after `python setup.py extract_messages` | ||
|
||
PLUGIN_NAME=report | ||
PLUGIN_DEPENDENCIES= | ||
|
||
SAVE_REUSED=0 | ||
VERBOSE=0 | ||
CURR_DIR=$(readlink -m $0/..) | ||
SRC_DIR=$(readlink -m $0/../../../../..) | ||
|
||
while getopts ":p:r:" opt; do | ||
case $opt in | ||
l) LANGUAGES="$OPTARG" | ||
;; | ||
p) PLUGIN_DEPENDENCIES="$OPTARG" | ||
;; | ||
r) SAVE_REUSED=1 | ||
;; | ||
v) VERBOSE=1 | ||
;; | ||
\?) echo "Invalid option -$OPTARG" >&2 | ||
;; | ||
esac | ||
done | ||
|
||
function run_verbose { | ||
if [ $VERBOSE ]; then | ||
echo "# Running: $1" | ||
fi | ||
eval $1 | ||
} | ||
|
||
# Find strings that we have reused from core CKAN and other plugins | ||
DEP_POTS="" | ||
for PLUGIN in $PLUGIN_DEPENDENCIES; do | ||
DEP=$SRC_DIR/ckanext-$PLUGIN/ckanext/$PLUGIN/i18n/ckanext-$PLUGIN.pot | ||
if [ -f $DEP ]; then | ||
DEP_POTS="$DEP_POTS $DEP" | ||
else | ||
echo "Warning: .pot file for dependent $PLUGIN plugin doesn't exist, skipping $DEP" | ||
fi | ||
done | ||
|
||
run_verbose "msgcat $SRC_DIR/ckan/ckan/i18n/ckan.pot $DEP_POTS -o $CURR_DIR/_dependencies.pot" | ||
|
||
# Identify reused translations | ||
touch $CURR_DIR/_reused_translations.pot | ||
run_verbose "msgcat --use-first --more-than=1 $CURR_DIR/_dependencies.pot $CURR_DIR/ckanext-$PLUGIN_NAME.pot -o $CURR_DIR/_reused_translations.pot" | ||
|
||
# Leave only unique strings in our pot | ||
run_verbose "msgcat --unique $CURR_DIR/ckanext-$PLUGIN_NAME.pot $CURR_DIR/_reused_translations.pot -o $CURR_DIR/ckanext-$PLUGIN_NAME.pot" | ||
|
||
rm $CURR_DIR/_dependencies.pot | ||
if [ ! $SAVE_REUSED ]; then | ||
rm $CURR_DIR/_reused_translations.pot | ||
else | ||
echo "Saving $CURR_DIR/_reused_translations.pot" | ||
fi | ||
|
||
echo "" | ||
echo "I've updated $CURR_DIR/ckanext-$PLUGIN_NAME.pot." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[extract_messages] | ||
keywords = translate isPlural | ||
add_comments = TRANSLATORS: | ||
output_file = ckanext/report/i18n/ckanext-report.pot | ||
width = 80 | ||
mapping_file = babel.cfg | ||
|
||
[init_catalog] | ||
domain = ckanext-report | ||
input_file = ckanext/report/i18n/ckanext-report.pot | ||
output_dir = ckanext/report/i18n | ||
|
||
[update_catalog] | ||
domain = ckanext-report | ||
input_file = ckanext/report/i18n/ckanext-report.pot | ||
output_dir = ckanext/report/i18n | ||
previous = true | ||
|
||
[compile_catalog] | ||
domain = ckanext/report/ckanext-report | ||
directory = i18n | ||
statistics = true |