diff --git a/assets/javascripts/wizard/helpers/char-counter.js.es6 b/assets/javascripts/wizard/helpers/char-counter.js.es6
index 4cc12463..c27c0818 100644
--- a/assets/javascripts/wizard/helpers/char-counter.js.es6
+++ b/assets/javascripts/wizard/helpers/char-counter.js.es6
@@ -3,14 +3,13 @@ import I18n from "I18n";
export default registerUnbound("char-counter", function(body, maxLength) {
let bodyLength = body ? body.length : 0;
- let length = maxLength || bodyLength;
- let characterString = length == 1 ? 'wizard.character' : 'wizard.characters';
let finalString;
- if(maxLength) {
- finalString = `
${bodyLength} / ${maxLength} ${ I18n.t(characterString)}
`;
+ if (maxLength) {
+ finalString = `${bodyLength} / ${I18n.t('wizard.x_characters', { count: parseInt(maxLength) })}
`;
} else {
- finalString = `${bodyLength} ${ I18n.t(characterString)}
`;
+ finalString = `${I18n.t('wizard.x_characters', { count: parseInt(bodyLength) })}
`;
}
+
return new Handlebars.SafeString(finalString);
});
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index fef9c870..28304120 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -471,8 +471,9 @@ en:
requires_login: "You need to be logged in to access this wizard."
reset: "Reset this wizard."
step_not_permitted: "You're not permitted to view this step."
- characters: "Characters"
- character: "Character"
+ x_characters:
+ one: "%{count} Character"
+ other: "%{count} Characters"
wizard_composer:
show_preview: "Preview Post"