Skip to content

Releases: dkfbasel/vuex-i18n

Fix missing typescript link in package.json

30 Jul 13:28
Compare
Choose a tag to compare

Add basic typescript info

30 Jul 12:44
Compare
Choose a tag to compare

This release adds very basic typescript information to the plugin. A new version is in the works, which will be written completely in typescript.

Add translateIn filter

02 Jan 15:35
Compare
Choose a tag to compare

This release adds a new filter translateIn to translate a message in a specific language:

{{ 'message' | translateIn('en') }}

Thanks to @zhangqiangoffice for the corresponding pull request #91 which was adapted for this.

Fix plugin build

02 Jan 13:05
Compare
Choose a tag to compare

This release fixes an issue with the previous build. Due to babel directory constraints, the previous build would not transpile the code correctly.

See #104 for details.

Improve regex matcher to also allow for single character variable substitutions

24 Dec 14:10
Compare
Choose a tag to compare

This release restores the compatibility with variable substitutions that are comprised of a single character i.e. $t('this is some {0} information', {'0': 'important'}).

Should fix #104 and also address #102.

Small improvements and some restructuring

11 Dec 16:04
Compare
Choose a tag to compare

This release contains a restructured directory with better specification of the build directory, an initial documentation in vuepress, an example for a todo mvc and the slides of a recent talk regarding vue-i18n and vuex-i18n at a vue-meetup in Switzerland.

Improvements:

  • Regexp for variable identifiers should now be more robust. See #98
  • Warnings can now be suppressed via config. See #99

New method $i18n.locales, i18n.locales

26 Jan 08:45
Compare
Choose a tag to compare

As per request #66 we added a method to fetch all current locales. An example is given in the test repository.

Please keep in mind that this is a method that will be invoked on every render cycle. To make use of vue's caching system I would recommend to create a getter method or computed property like this.

locales() {
  return Object.keys(this.$store.state.i18n.translations);
}

Hotfix: Fix problem with module initialization

10 Jan 19:58
Compare
Choose a tag to compare

This is a hotfix for version 1.10.

Module initialization was change in 1.10.0 to include the option preserveState. This would not correctly initialize the module as intended for the plugin.

Version 1.10.4 fixes this and allows you to specify preserveState via configuration parameter if actually necessary for server side rendering.

Allow specification pluralization via arrays

09 Jan 16:38
Compare
Choose a tag to compare

Thanks to the pull request #41 from @galchenkov it is now possible to specifies pluralizations via arrays instead of using ::: as delimiter.

$i18n.add('en', {'comments': [
    '{count} comment',
    '{count} comments',
]});

$i18n.add('ru', {'comments': [
    '{count} комментарий',
    '{count} комментария',
    '{count} комментариев',
]});

$i18n.set('en');
$t('comments', {count: 5}, 5); // 5 comments

$i18n.set('ru');
$t('comments', {count: 5}, 5); // 5 комментариев

Add defaultValue to onTranslationNotFoundMethod

09 Jan 16:36
Compare
Choose a tag to compare