Fix Plural Strings

This commit is contained in:
safaalfulaij
2016-08-10 20:24:28 +03:00
parent 24201d4638
commit 291c32aa69
6 changed files with 39 additions and 19 deletions

View File

@@ -96,7 +96,7 @@ const AdminUser = Discourse.User.extend({
deleteAllPosts() {
const user = this,
message = I18n.t('admin.user.delete_all_posts_confirm', { posts: user.get('post_count'), topics: user.get('topic_count') }),
message = I18n.messageFormat('admin.user.delete_all_posts_confirm_MF', { "POSTS": user.get('post_count'), "TOPICS": user.get('topic_count') }),
buttons = [{
"label": I18n.t("composer.cancel"),
"class": "cancel-inline",
@@ -467,13 +467,13 @@ const AdminUser = Discourse.User.extend({
user.checkEmail().then(function() {
const data = {
posts: user.get('post_count'),
topics: user.get('topic_count'),
"POSTS": user.get('post_count'),
"TOPICS": user.get('topic_count'),
email: user.get('email') || I18n.t("flagging.hidden_email_address"),
ip_address: user.get('ip_address') || I18n.t("flagging.ip_address_missing")
};
const message = I18n.t('flagging.delete_confirm', data),
const message = I18n.messageFormat('flagging.delete_confirm_MF', data),
buttons = [{
"label": I18n.t("composer.cancel"),
"class": "cancel-inline",

View File

@@ -10,7 +10,7 @@
<div class="admin-container tl3-requirements">
<h2>{{model.username}} - {{i18n 'admin.user.tl3_requirements.title'}}</h2>
<br/>
<p>{{i18n 'admin.user.tl3_requirements.table_title' time_period=model.tl3Requirements.time_period}}</p>
<p>{{i18n 'admin.user.tl3_requirements.table_title' count=model.tl3Requirements.time_period}}</p>
<table class="table" style="width: auto;">
<thead>

View File

@@ -36,12 +36,12 @@ export default Ember.Component.extend({
const len = messageLength || 0;
const minLen = Discourse.SiteSettings.min_private_message_post_length;
if (len === 0) {
return I18n.t("flagging.custom_message.at_least", { n: minLen });
return I18n.t("flagging.custom_message.at_least", { count: minLen });
} else if (len < minLen) {
return I18n.t("flagging.custom_message.more", { n: minLen - len });
return I18n.t("flagging.custom_message.more", { count: minLen - len });
} else {
return I18n.t("flagging.custom_message.left", {
n: MAX_MESSAGE_LENGTH - len
count: MAX_MESSAGE_LENGTH - len
});
}
},

View File

@@ -69,7 +69,7 @@ export default Ember.Controller.extend(ModalFunctionality, {
willCloseI18n: function() {
if (this.get('model.details.auto_close_based_on_last_post')) {
return I18n.t('topic.auto_close_immediate', {hours: this.get('model.auto_close_time')});
return I18n.t('topic.auto_close_immediate', {count: this.get('model.auto_close_time')});
}
}.property('model.details.auto_close_based_on_last_post', 'model.auto_close_time')

View File

@@ -31,7 +31,7 @@
{{/if}}
{{#if showFilter}}
<li><a class='btn' href {{action "togglePosts" user}}>{{fa-icon "filter"}}{{i18n 'topic.filter_to' username=username post_count=topicPostCount}}</a></li>
<li><a class='btn' href {{action "togglePosts" user}}>{{fa-icon "filter"}}{{i18n 'topic.filter_to' username=username count=topicPostCount}}</a></li>
{{/if}}
{{#if hasUserFilters}}