[ckan-changes] [ckan/ckan] 7d22c0: [#959] add ITranslations interface

GitHub noreply at github.com
Tue Sep 15 14:07:44 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/ckan/ckan
  Commit: 7d22c0c5a56d6dea314ccd6a29d437ece686a993
      https://github.com/ckan/ckan/commit/7d22c0c5a56d6dea314ccd6a29d437ece686a993
  Author: joetsoi <joe.yeung.tsoi at gmail.com>
  Date:   2015-06-16 (Tue, 16 Jun 2015)

  Changed paths:
    M ckan/lib/i18n.py
    M ckan/lib/plugins.py
    M ckan/plugins/interfaces.py

  Log Message:
  -----------
  [#959] add ITranslations interface

This allows extensions to merge in their own translations with the main
ckan mo file. Each extension should have an 'i18n' directory in the root
directory of their repo containing its translations. The gettext domain
(and hence filename) of the .mo files should be ckanext-{extname}


  Commit: 5ffd13a36dc16dfbff76ba5bc29ab22e53c2f640
      https://github.com/ckan/ckan/commit/5ffd13a36dc16dfbff76ba5bc29ab22e53c2f640
  Author: joetsoi <joe.yeung.tsoi at gmail.com>
  Date:   2015-06-16 (Tue, 16 Jun 2015)

  Changed paths:
    M ckan/lib/i18n.py
    M ckan/lib/plugins.py
    M ckan/plugins/interfaces.py
    A ckanext/example_itranslation/__init__.py
    A ckanext/example_itranslation/babel_mapping.cfg
    A ckanext/example_itranslation/i18n/ckanext-example_translation.pot
    A ckanext/example_itranslation/i18n/fr/LC_MESSAGES/ckanext-example_itranslation.mo
    A ckanext/example_itranslation/i18n/fr/LC_MESSAGES/ckanext-example_itranslation.po
    A ckanext/example_itranslation/plugin.py
    A ckanext/example_itranslation/templates/home/index.html
    A ckanext/example_itranslation/tests/__init__.py
    A ckanext/example_itranslation/tests/test_plugin.py
    M setup.py

  Log Message:
  -----------
  [#959] Add example ITranslation plugin


  Commit: 4bb5b4291eaf8bd55316751c791b81d423cf3d2b
      https://github.com/ckan/ckan/commit/4bb5b4291eaf8bd55316751c791b81d423cf3d2b
  Author: joetsoi <joe.yeung.tsoi at gmail.com>
  Date:   2015-06-16 (Tue, 16 Jun 2015)

  Changed paths:
    M ckanext/example_itranslation/tests/test_plugin.py

  Log Message:
  -----------
  [#959] Tests for example_itranslation plugin


  Commit: 0e9dfaac9648835620042dfb99b3bac2c3478e3d
      https://github.com/ckan/ckan/commit/0e9dfaac9648835620042dfb99b3bac2c3478e3d
  Author: joetsoi <joe.yeung.tsoi at gmail.com>
  Date:   2015-06-16 (Tue, 16 Jun 2015)

  Changed paths:
    M ckanext/example_itranslation/tests/test_plugin.py

  Log Message:
  -----------
  [#959] Add double check for example_itranslation tests


  Commit: 93d3a542e28cbfe0f729fa9cfafae7a618d85ba1
      https://github.com/ckan/ckan/commit/93d3a542e28cbfe0f729fa9cfafae7a618d85ba1
  Author: joetsoi <joe.yeung.tsoi at gmail.com>
  Date:   2015-06-16 (Tue, 16 Jun 2015)

  Changed paths:
    M ckan/lib/i18n.py
    M ckanext/example_itranslation/tests/test_plugin.py

  Log Message:
  -----------
  [#959] ITranslation interface fix

Only add translations strings for the current locale (instead of all).
Allow 'en' translation strings in extensions to overwrite core strings.


  Commit: 4f199d1a1c97b7ee318209e942bab90e45565350
      https://github.com/ckan/ckan/commit/4f199d1a1c97b7ee318209e942bab90e45565350
  Author: joetsoi <joe.yeung.tsoi at gmail.com>
  Date:   2015-06-16 (Tue, 16 Jun 2015)

  Changed paths:
    M ckan/lib/i18n.py
    M ckan/lib/plugins.py
    M ckan/plugins/interfaces.py

  Log Message:
  -----------
  [#959] extra 18n directory, rename interface names

Add config options
  'ckan.i18n.extra_directory'
  'ckan.i18n.extra_gettext_domain'
  'ckan.i18n.extra_locales'

'ckan.i18n.extra_directory' should be a fully qualified path
'ckan.i18n.extra_gettext_domain' should be the filename of mo files
'ckan.i18n.extra_locales' should be a list for each locale handled

Rename the interfaces method names to reduce the risk of clashing
'domain' and 'directory' are too generic and might be used by other
plugins in the future and there is no indication as a plugin writer that
these methods are related to the ITranslation interface. So they have
been changed to 'i18n_domain' etc.


  Commit: c135d4c83ea0333ac6d38e352e19aaef5b0b8cc7
      https://github.com/ckan/ckan/commit/c135d4c83ea0333ac6d38e352e19aaef5b0b8cc7
  Author: joetsoi <joe.yeung.tsoi at gmail.com>
  Date:   2015-06-16 (Tue, 16 Jun 2015)

  Changed paths:
    M ckan/lib/i18n.py
    M doc/maintaining/configuration.rst

  Log Message:
  -----------
  [#959]ITranslations, check config options and docs


  Commit: 10b8db8f387cb518b27748250ed2c5319934e2f2
      https://github.com/ckan/ckan/commit/10b8db8f387cb518b27748250ed2c5319934e2f2
  Author: joetsoi <joe.yeung.tsoi at gmail.com>
  Date:   2015-06-16 (Tue, 16 Jun 2015)

  Changed paths:
    A ckanext/example_itranslation/i18n/ckanext-example_itranslation.pot
    R ckanext/example_itranslation/i18n/ckanext-example_translation.pot
    A ckanext/example_itranslation/i18n/en/LC_MESSAGES/ckanext-example_itranslation.mo
    A ckanext/example_itranslation/i18n/en/LC_MESSAGES/ckanext-example_itranslation.po
    A ckanext/example_itranslation/i18n/en/LC_MESSAGES/ckanext-example_translation.po
    M ckanext/example_itranslation/tests/test_plugin.py

  Log Message:
  -----------
  [#959] example_itranslation test for 'en' string replacements

Add a test for checking that 'en' replacement strings which are handled
as a special case work


  Commit: 8d0d27e2a16b40ca0f461a16af92cbe2d6381904
      https://github.com/ckan/ckan/commit/8d0d27e2a16b40ca0f461a16af92cbe2d6381904
  Author: joetsoi <joetsoi at users.noreply.github.com>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M CHANGELOG.rst
    R bin/canada.py
    R bin/ckan-correct-tags.py
    R bin/ckan-edit-tags.py
    R bin/ckan-edit-tags2.py
    R bin/ckan-hmg-breakdown.py
    R bin/ckan-hmg-update-licenses.py
    R bin/ckan-rest-edit-tags.py
    R bin/ckan_edit_local.py
    R bin/ckan_spam.py
    R bin/copy-ckan-2-ckan.py
    R bin/dump-ukgov.py
    R bin/dump_23_pkgs.py
    R bin/fixes.py
    M bin/less
    R bin/loadconfig.py
    R bin/ons-load.py
    R bin/revision_manager.py
    R bin/status.py
    R bin/talisckan.py
    R bin/webstore_test.py
    M ckan/__init__.py
    M ckan/authz.py
    M ckan/config/deployment.ini_tmpl
    M ckan/config/environment.py
    M ckan/config/resource_formats.json
    M ckan/config/routing.py
    M ckan/config/solr/schema.xml
    M ckan/controllers/admin.py
    M ckan/controllers/api.py
    M ckan/controllers/group.py
    M ckan/controllers/home.py
    M ckan/controllers/package.py
    R ckan/controllers/related.py
    M ckan/controllers/user.py
    M ckan/lib/app_globals.py
    M ckan/lib/base.py
    M ckan/lib/captcha.py
    M ckan/lib/cli.py
    M ckan/lib/create_test_data.py
    M ckan/lib/dictization/model_dictize.py
    M ckan/lib/dictization/model_save.py
    M ckan/lib/formatters.py
    M ckan/lib/helpers.py
    A ckan/lib/lazyjson.py
    M ckan/lib/plugins.py
    M ckan/lib/uploader.py
    M ckan/logic/__init__.py
    M ckan/logic/action/create.py
    M ckan/logic/action/get.py
    M ckan/logic/action/update.py
    M ckan/logic/auth/create.py
    M ckan/logic/auth/get.py
    M ckan/logic/auth/update.py
    M ckan/logic/schema.py
    A ckan/migration/versions/077_add_revisions_to_system_info.py
    A ckan/migration/versions/078_remove_old_authz_model.py
    M ckan/model/__init__.py
    R ckan/model/authz.py
    M ckan/model/modification.py
    M ckan/model/system_info.py
    M ckan/pastertemplates/template/README.rst_tmpl
    M ckan/plugins/interfaces.py
    M ckan/public/base/css/main.css
    M ckan/public/base/javascript/main.js
    M ckan/public/base/test/index.html
    A ckan/public/base/vendor/moment-with-locales.js
    M ckan/public/base/vendor/resource.config
    M ckan/templates/admin/config.html
    R ckan/templates/ajax_snippets/related-item.html
    M ckan/templates/group/confirm_delete.html
    M ckan/templates/group/index.html
    M ckan/templates/group/member_new.html
    M ckan/templates/group/members.html
    M ckan/templates/group/read.html
    M ckan/templates/group/snippets/info.html
    M ckan/templates/home/snippets/stats.html
    M ckan/templates/organization/bulk_process.html
    M ckan/templates/organization/confirm_delete.html
    M ckan/templates/organization/index.html
    M ckan/templates/organization/read.html
    M ckan/templates/organization/snippets/organization_form.html
    M ckan/templates/organization/snippets/organization_item.html
    M ckan/templates/package/confirm_delete.html
    M ckan/templates/package/confirm_delete_resource.html
    M ckan/templates/package/read.html
    R ckan/templates/package/read.n3
    R ckan/templates/package/read.rdf
    M ckan/templates/package/read_base.html
    M ckan/templates/package/resource_data.html
    M ckan/templates/package/search.html
    M ckan/templates/package/snippets/additional_info.html
    M ckan/templates/package/snippets/package_basic_fields.html
    M ckan/templates/package/snippets/resource_view.html
    R ckan/templates/related/base_form_page.html
    R ckan/templates/related/confirm_delete.html
    R ckan/templates/related/dashboard.html
    R ckan/templates/related/edit.html
    R ckan/templates/related/edit_form.html
    R ckan/templates/related/new.html
    R ckan/templates/related/snippets/related_form.html
    R ckan/templates/related/snippets/related_item.html
    R ckan/templates/related/snippets/related_list.html
    A ckan/templates/snippets/local_friendly_datetime.html
    M ckan/templates/snippets/search_form.html
    M ckan/templates/user/edit_user_form.html
    M ckan/templates/user/new_user_form.html
    M ckan/templates/user/snippets/recaptcha.html
    M ckan/templates/user/snippets/user_search.html
    M ckan/tests/config/test_environment.py
    A ckan/tests/controllers/test_admin.py
    M ckan/tests/controllers/test_api.py
    M ckan/tests/controllers/test_group.py
    A ckan/tests/controllers/test_home.py
    A ckan/tests/controllers/test_organization.py
    M ckan/tests/controllers/test_package.py
    A ckan/tests/controllers/test_tags.py
    M ckan/tests/controllers/test_user.py
    M ckan/tests/factories.py
    M ckan/tests/helpers.py
    M ckan/tests/legacy/__init__.py
    M ckan/tests/legacy/ckantestplugins.py
    M ckan/tests/legacy/functional/api/model/test_group.py
    M ckan/tests/legacy/functional/api/model/test_package.py
    M ckan/tests/legacy/functional/api/model/test_vocabulary.py
    M ckan/tests/legacy/functional/api/test_dashboard.py
    R ckan/tests/legacy/functional/api/test_revision_search.py
    M ckan/tests/legacy/functional/api/test_util.py
    M ckan/tests/legacy/functional/test_admin.py
    M ckan/tests/legacy/functional/test_group.py
    R ckan/tests/legacy/functional/test_home.py
    M ckan/tests/legacy/functional/test_package.py
    M ckan/tests/legacy/functional/test_pagination.py
    M ckan/tests/legacy/functional/test_related.py
    M ckan/tests/legacy/functional/test_user.py
    M ckan/tests/legacy/lib/test_helpers.py
    M ckan/tests/legacy/logic/test_action.py
    M ckan/tests/legacy/logic/test_tag.py
    M ckan/tests/legacy/models/test_group.py
    M ckan/tests/legacy/models/test_user.py
    M ckan/tests/legacy/test_coding_standards.py
    M ckan/tests/legacy/test_plugins.py
    R ckan/tests/legacy/test_wsgi_ckanclient.py
    R ckan/tests/legacy/wsgi_ckanclient.py
    M ckan/tests/lib/dictization/test_model_dictize.py
    A ckan/tests/lib/test_app_globals.py
    M ckan/tests/lib/test_base.py
    M ckan/tests/lib/test_helpers.py
    M ckan/tests/logic/action/test_create.py
    M ckan/tests/logic/action/test_get.py
    M ckan/tests/logic/action/test_update.py
    M ckan/tests/logic/auth/test_get.py
    M ckan/tests/logic/auth/test_update.py
    A ckan/tests/model/test_system_info.py
    A ckanext/datapusher/interfaces.py
    M ckanext/datapusher/logic/action.py
    M ckanext/datapusher/plugin.py
    A ckanext/datapusher/tests/test_interfaces.py
    M ckanext/datastore/db.py
    M ckanext/datastore/helpers.py
    M ckanext/datastore/plugin.py
    M ckanext/datastore/tests/test_create.py
    M ckanext/example_iconfigurer/plugin.py
    A ckanext/example_iconfigurer/plugin_v1.py
    A ckanext/example_iconfigurer/plugin_v2.py
    A ckanext/example_iconfigurer/templates/admin/config.html
    A ckanext/example_iconfigurer/tests/test_iconfigurer_update_config.py
    M ckanext/example_theme/v08_custom_helper_function/plugin.py
    M ckanext/example_theme/v18_snippet_api/templates/ajax_snippets/example_theme_popover.html
    M ckanext/multilingual/solr/schema.xml
    M ckanext/reclineview/plugin.py
    M ckanext/reclineview/theme/public/vendor/recline/recline.js
    M ckanext/reclineview/theme/templates/recline_map_form.html
    M ckanext/resourceproxy/controller.py
    M ckanext/stats/controller.py
    M ckanext/stats/stats.py
    M ckanext/stats/templates/ckanext/stats/index.html
    M ckanext/stats/templates_legacy/ckanext/stats/index.html
    M ckanext/stats/tests/test_stats_lib.py
    M contrib/docker/my_init.d/50_configure
    M dev-requirements.txt
    R doc/api.rst
    M doc/api/index.rst
    M doc/api/legacy-api.rst
    M doc/contents.rst
    M doc/contributing/frontend/index.rst
    M doc/contributing/frontend/template-blocks.rst
    M doc/contributing/release-process.rst
    M doc/contributing/reviewing.rst
    M doc/extensions/index.rst
    A doc/extensions/remote-config-update.rst
    A doc/images/custom_config_fields.png
    M doc/index.rst
    M doc/maintaining/configuration.rst
    M doc/maintaining/installing/install-from-package.rst
    M doc/maintaining/installing/install-from-source.rst
    M doc/maintaining/linked-data-and-rdf.rst
    M requirements.in
    M requirements.txt
    M setup.py

  Log Message:
  -----------
  Merge branch 'master' into itranslation-interface

Conflicts:
	doc/maintaining/configuration.rst
	setup.py


  Commit: 2dbd53e59474a56186f85474c51c36710af2a1bf
      https://github.com/ckan/ckan/commit/2dbd53e59474a56186f85474c51c36710af2a1bf
  Author: joetsoi <joetsoi at users.noreply.github.com>
  Date:   2015-09-15 (Tue, 15 Sep 2015)

  Changed paths:
    M ckan/lib/i18n.py

  Log Message:
  -----------
  [#2461] Add custom translation directory after plugins


  Commit: 2d26a841a35509d51e1d16e1c1a69c4d312444b8
      https://github.com/ckan/ckan/commit/2d26a841a35509d51e1d16e1c1a69c4d312444b8
  Author: joetsoi <joetsoi at users.noreply.github.com>
  Date:   2015-09-15 (Tue, 15 Sep 2015)

  Changed paths:
    M ckan/config/routing.py
    M ckan/controllers/storage.py
    M ckan/lib/helpers.py
    M ckan/lib/lazyjson.py
    M ckan/lib/uploader.py
    M ckan/logic/action/create.py
    M ckan/logic/action/get.py
    M ckan/logic/action/update.py
    M ckan/plugins/interfaces.py
    M ckan/templates/snippets/organization_item.html
    R ckan/tests/legacy/functional/test_storage.py
    M ckan/tests/legacy/test_coding_standards.py
    M ckan/tests/logic/action/test_get.py
    M ckanext/stats/controller.py
    R ckanext/stats/public/ckanext/stats/app.js
    R ckanext/stats/public/ckanext/stats/demo.html
    R ckanext/stats/public/ckanext/stats/style.css
    R ckanext/stats/templates_legacy/__init__.py
    R ckanext/stats/templates_legacy/ckanext/__init__.py
    R ckanext/stats/templates_legacy/ckanext/stats/__init__.py
    R ckanext/stats/templates_legacy/ckanext/stats/index.html
    R ckanext/stats/templates_legacy/ckanext/stats/leaderboard.html
    M doc/maintaining/datastore.rst

  Log Message:
  -----------
  Merge branch 'master' into itranslation-interface

Conflicts:
	ckan/plugins/interfaces.py


  Commit: 76f2c48d89bdb38810f8d6a63dc3e3ffda9a6cdf
      https://github.com/ckan/ckan/commit/76f2c48d89bdb38810f8d6a63dc3e3ffda9a6cdf
  Author: Ian Ward <ian at excess.org>
  Date:   2015-09-15 (Tue, 15 Sep 2015)

  Changed paths:
    M ckan/lib/i18n.py
    M ckan/lib/plugins.py
    M ckan/plugins/interfaces.py
    A ckanext/example_itranslation/__init__.py
    A ckanext/example_itranslation/babel_mapping.cfg
    A ckanext/example_itranslation/i18n/ckanext-example_itranslation.pot
    A ckanext/example_itranslation/i18n/en/LC_MESSAGES/ckanext-example_itranslation.mo
    A ckanext/example_itranslation/i18n/en/LC_MESSAGES/ckanext-example_itranslation.po
    A ckanext/example_itranslation/i18n/en/LC_MESSAGES/ckanext-example_translation.po
    A ckanext/example_itranslation/i18n/fr/LC_MESSAGES/ckanext-example_itranslation.mo
    A ckanext/example_itranslation/i18n/fr/LC_MESSAGES/ckanext-example_itranslation.po
    A ckanext/example_itranslation/plugin.py
    A ckanext/example_itranslation/templates/home/index.html
    A ckanext/example_itranslation/tests/__init__.py
    A ckanext/example_itranslation/tests/test_plugin.py
    M doc/maintaining/configuration.rst
    M setup.py

  Log Message:
  -----------
  Merge pull request #2461 from joetsoi/itranslation-interface

add ITranslations interface


Compare: https://github.com/ckan/ckan/compare/50f5e37d3729...76f2c48d89bd


More information about the ckan-changes mailing list