[ckan-changes] [ckan/ckan] e196fc: [#3151] Add `ckan.i18n._` and `ckan.i18n.ngettext`...

GitHub noreply at github.com
Tue Nov 29 13:24:39 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/ckan/ckan
  Commit: e196fcd8d24572b70ade496ab5bcb368f09526ff
      https://github.com/ckan/ckan/commit/e196fcd8d24572b70ade496ab5bcb368f09526ff
  Author: Florian Brucker <florian.brucker at mb.karlsruhe.de>
  Date:   2016-11-18 (Fri, 18 Nov 2016)

  Changed paths:
    M ckan/public/base/javascript/i18n.js

  Log Message:
  -----------
  [#3151] Add `ckan.i18n._` and `ckan.i18n.ngettext` JS functions.

They are intended as replacements for the raw Jed interface
`ckan.i18n.translate`. The latter makes extraction of plural messages
impossible and is therefore deprecated.


  Commit: 254f77051ab344910c43a84f2132b4515694babf
      https://github.com/ckan/ckan/commit/254f77051ab344910c43a84f2132b4515694babf
  Author: Florian Brucker <florian.brucker at mb.karlsruhe.de>
  Date:   2016-11-18 (Fri, 18 Nov 2016)

  Changed paths:
    M ckan/public/base/javascript/module.js
    M ckan/public/base/test/spec/module.spec.js

  Log Message:
  -----------
  [#3151] Add `this._` and `this.ngettext` methods to JS modules.

They are shortucts to `ckan.i18n._` and `ckan.i18n.ngettext`,
respectively, and replace the old `this.i18n` mechanism which is hereby
deprecated.

The `ckan.i18n.translate` and `ckan.i18n` arguments passed to module
initialization functions are also deprecated.


  Commit: 9e81917546c7ad806728ba6cded2b284a77fe464
      https://github.com/ckan/ckan/commit/9e81917546c7ad806728ba6cded2b284a77fe464
  Author: Florian Brucker <florian.brucker at mb.karlsruhe.de>
  Date:   2016-11-18 (Fri, 18 Nov 2016)

  Changed paths:
    M ckan/public/base/javascript/modules/activity-stream.js
    M ckan/public/base/javascript/modules/api-info.js
    M ckan/public/base/javascript/modules/autocomplete.js
    M ckan/public/base/javascript/modules/basic-form.js
    M ckan/public/base/javascript/modules/confirm-action.js
    M ckan/public/base/javascript/modules/custom-fields.js
    M ckan/public/base/javascript/modules/dashboard.js
    M ckan/public/base/javascript/modules/dataset-visibility.js
    M ckan/public/base/javascript/modules/follow.js
    M ckan/public/base/javascript/modules/image-upload.js
    M ckan/public/base/javascript/modules/media-grid.js
    M ckan/public/base/javascript/modules/popover-context.js
    M ckan/public/base/javascript/modules/resource-form.js
    M ckan/public/base/javascript/modules/resource-reorder.js
    M ckan/public/base/javascript/modules/resource-upload-field.js
    M ckan/public/base/javascript/modules/resource-view-embed.js
    M ckan/public/base/javascript/modules/resource-view-filters.js
    M ckan/public/base/javascript/modules/resource-view-reorder.js
    M ckan/public/base/javascript/modules/slug-preview.js
    M ckan/public/base/javascript/modules/table-selectable-rows.js
    M ckan/public/base/javascript/modules/table-toggle-more.js
    M ckan/templates/admin/config.html
    M ckan/templates/group/member_new.html
    M ckan/templates/group/members.html
    M ckan/templates/group/snippets/group_form.html
    M ckan/templates/organization/member_new.html
    M ckan/templates/organization/members.html
    M ckan/templates/organization/snippets/organization_form.html
    M ckan/templates/package/snippets/package_form.html
    M ckan/templates/package/snippets/resource_form.html
    M ckan/templates/user/edit_user_form.html
    M ckanext/reclineview/theme/public/recline_view.js
    M ckanext/stats/public/ckanext/stats/javascript/modules/plot.js
    M ckanext/textview/theme/public/text_view.js

  Log Message:
  -----------
  [#3151] Update JS modules to new i18n functions.

* Usages of `this.i18n` are replaced by `this._` and `this.ngettext`.

* Module initialization functions only take a single parameter (jQuery).

* The `confirm-action` module allows to pass the content via a HTML
  `data-module-`-parameter.  That parameter has been renamed from
  `data-module-i18n-content` to `data-module-content` to reflect the
  deprecation of the `this.i18n`-functionality. The old name still works
  but the templates have been updated to use the new name instead.


  Commit: 739e3c254abf8d149f97f2302fee703e99cabfed
      https://github.com/ckan/ckan/commit/739e3c254abf8d149f97f2302fee703e99cabfed
  Author: Florian Brucker <florian.brucker at mb.karlsruhe.de>
  Date:   2016-11-18 (Fri, 18 Nov 2016)

  Changed paths:
    M setup.cfg

  Log Message:
  -----------
  [#3151] Remove deprecated JS i18n functions from Babel configuration.


  Commit: 466d2fbbba3ad43085e0f22e4129f086ae3617c8
      https://github.com/ckan/ckan/commit/466d2fbbba3ad43085e0f22e4129f086ae3617c8
  Author: Florian Brucker <florian.brucker at mb.karlsruhe.de>
  Date:   2016-11-18 (Fri, 18 Nov 2016)

  Changed paths:
    M ckan/public/base/test/index.html
    A ckan/public/base/test/spec/i18n.spec.js
    M ckan/public/base/test/spec/module.spec.js
    M ckan/public/base/test/spec/modules/confirm-action.spec.js
    M ckan/public/base/test/spec/sandbox.spec.js

  Log Message:
  -----------
  [#3151] Tests for new JavaScript i18n interface.


  Commit: 3ba38a72547477a7ea64d4faee7c17b291757f66
      https://github.com/ckan/ckan/commit/3ba38a72547477a7ea64d4faee7c17b291757f66
  Author: Florian Brucker <florian.brucker at mb.karlsruhe.de>
  Date:   2016-11-18 (Fri, 18 Nov 2016)

  Changed paths:
    M ckanext/example_theme/v16_initialize_a_javascript_module/fanstatic/example_theme_popover.js
    M ckanext/example_theme/v17_popover/fanstatic/example_theme_popover.js
    M ckanext/example_theme/v18_snippet_api/fanstatic/example_theme_popover.js
    M ckanext/example_theme/v19_01_error/fanstatic/example_theme_popover.js
    M ckanext/example_theme/v19_02_error_handling/fanstatic/example_theme_popover.js
    M ckanext/example_theme/v20_pubsub/fanstatic/example_theme_popover.js
    M ckanext/example_theme/v21_custom_jquery_plugin/fanstatic/example_theme_popover.js
    M doc/contributing/frontend/index.rst
    M doc/contributing/frontend/javascript-module-tutorial.rst
    M doc/contributing/frontend/templating.rst
    M doc/contributing/javascript.rst
    M doc/contributing/string-i18n.rst
    M doc/extensions/translating-extensions.rst
    M doc/theming/javascript-module-objects-and-methods.rst

  Log Message:
  -----------
  [#3151] Update documentation of i18n in JS

Updates the documentation and example code for the new `this._` and
`this.ngettext` methods of JS modules.


  Commit: 356c6452b57b1ca50db3e39871c8a742bd7607f9
      https://github.com/ckan/ckan/commit/356c6452b57b1ca50db3e39871c8a742bd7607f9
  Author: Adrià Mercader <amercadero at gmail.com>
  Date:   2016-11-29 (Tue, 29 Nov 2016)

  Changed paths:
    M ckan/public/base/javascript/i18n.js
    M ckan/public/base/javascript/module.js
    M ckan/public/base/javascript/modules/activity-stream.js
    M ckan/public/base/javascript/modules/api-info.js
    M ckan/public/base/javascript/modules/autocomplete.js
    M ckan/public/base/javascript/modules/basic-form.js
    M ckan/public/base/javascript/modules/confirm-action.js
    M ckan/public/base/javascript/modules/custom-fields.js
    M ckan/public/base/javascript/modules/dashboard.js
    M ckan/public/base/javascript/modules/dataset-visibility.js
    M ckan/public/base/javascript/modules/follow.js
    M ckan/public/base/javascript/modules/image-upload.js
    M ckan/public/base/javascript/modules/media-grid.js
    M ckan/public/base/javascript/modules/popover-context.js
    M ckan/public/base/javascript/modules/resource-form.js
    M ckan/public/base/javascript/modules/resource-reorder.js
    M ckan/public/base/javascript/modules/resource-upload-field.js
    M ckan/public/base/javascript/modules/resource-view-embed.js
    M ckan/public/base/javascript/modules/resource-view-filters.js
    M ckan/public/base/javascript/modules/resource-view-reorder.js
    M ckan/public/base/javascript/modules/slug-preview.js
    M ckan/public/base/javascript/modules/table-selectable-rows.js
    M ckan/public/base/javascript/modules/table-toggle-more.js
    M ckan/public/base/test/index.html
    A ckan/public/base/test/spec/i18n.spec.js
    M ckan/public/base/test/spec/module.spec.js
    M ckan/public/base/test/spec/modules/confirm-action.spec.js
    M ckan/public/base/test/spec/sandbox.spec.js
    M ckan/templates/admin/config.html
    M ckan/templates/group/member_new.html
    M ckan/templates/group/members.html
    M ckan/templates/group/snippets/group_form.html
    M ckan/templates/organization/member_new.html
    M ckan/templates/organization/members.html
    M ckan/templates/organization/snippets/organization_form.html
    M ckan/templates/package/snippets/package_form.html
    M ckan/templates/package/snippets/resource_form.html
    M ckan/templates/user/edit_user_form.html
    M ckanext/example_theme/v16_initialize_a_javascript_module/fanstatic/example_theme_popover.js
    M ckanext/example_theme/v17_popover/fanstatic/example_theme_popover.js
    M ckanext/example_theme/v18_snippet_api/fanstatic/example_theme_popover.js
    M ckanext/example_theme/v19_01_error/fanstatic/example_theme_popover.js
    M ckanext/example_theme/v19_02_error_handling/fanstatic/example_theme_popover.js
    M ckanext/example_theme/v20_pubsub/fanstatic/example_theme_popover.js
    M ckanext/example_theme/v21_custom_jquery_plugin/fanstatic/example_theme_popover.js
    M ckanext/reclineview/theme/public/recline_view.js
    M ckanext/stats/public/ckanext/stats/javascript/modules/plot.js
    M ckanext/textview/theme/public/text_view.js
    M doc/contributing/frontend/index.rst
    M doc/contributing/frontend/javascript-module-tutorial.rst
    M doc/contributing/frontend/templating.rst
    M doc/contributing/javascript.rst
    M doc/contributing/string-i18n.rst
    M doc/extensions/translating-extensions.rst
    M doc/theming/javascript-module-objects-and-methods.rst
    M setup.cfg

  Log Message:
  -----------
  Merge pull request #3211 from torfsen/3151-plural-translations-in-javascript

[#3151] Extractable plural translations in JavaScript


Compare: https://github.com/ckan/ckan/compare/d90ef1c5bcd3...356c6452b57b


More information about the ckan-changes mailing list