intlify / vue-i18n-loader

:globe_with_meridians: vue-i18n loader for custom blocks
MIT License
267 stars 29 forks source link

Doesn't work with "pluralizationRules" #158

Closed mixalbl4-127 closed 3 years ago

mixalbl4-127 commented 3 years ago
const i18n = createI18n({
    locale: "ru", // set locale
    pluralizationRules: {
        ru: function () {debugger;}
    }
});
<template>
        <div>
            {{ $tc("комментарий", 3) }}
        </div>
</template>
<i18n>
{
    "ru": {
        "комментарий": "{count} комментариев | {count} комментарий | {count} комментария | {count} комментария"
    }
}
</i18n>

in this case debugger will NEVER called.

But, when I placed translation here:

const i18n = createI18n({
    locale: "ru", // set locale
    pluralizationRules: {
        ru: function () {debugger;}
    },
    messages: {
      "ru": {
          "комментарий": "{count} комментариев | {count} комментарий | {count} комментария | {count} комментария"
      }
  }
});

all works fine!

@intlify/vue-i18n-loader: 2.0.0-rc.1

mixalbl4-127 commented 3 years ago

@kazupon please check this bug