FIX: Translation improvements for unused tags (d89ffbe)

This commit is contained in:
David Taylor 2018-11-12 16:36:56 +00:00
parent d89ffbeffd
commit ba00fcc371
2 changed files with 17 additions and 15 deletions

View File

@ -47,20 +47,22 @@ export default Ember.Controller.extend({
.then(result => {
const displayN = 20;
const tags = result["tags"];
const tagString = tags.slice(0, displayN).join(", ");
const joinedTags = tags.slice(0, displayN).join(", ");
var more = Math.max(0, tags.length - displayN);
const string =
const tagsString =
more === 0
? I18n.t("tagging.delete_unused_confirmation", {
count: tags.length,
tags: tagString
})
: I18n.t("tagging.delete_unused_confirmation_more", {
total: tags.length,
tags: tagString,
count: more
? joinedTags
: I18n.t("tagging.delete_unused_confirmation_more_tags", {
count: more,
tags: joinedTags
});
const string = I18n.t("tagging.delete_unused_confirmation", {
count: tags.length,
tags: tagsString
});
bootbox.confirm(
string,
I18n.t("tagging.cancel_delete_unused"),

View File

@ -2711,11 +2711,11 @@ en:
upload_instructions: "One per line, optionally with a tag group in the format 'tag_name,tag_group'."
upload_successful: "Tags uploaded successfully"
delete_unused_confirmation:
one: "1 tag will be deleted: %{tags}"
other: "{{count}} tags will be deleted: %{tags}"
delete_unused_confirmation_more:
one: "{{total}} tags will be deleted: %{tags} and one more"
other: "{{total}} tags will be deleted: %{tags} and %{count} more"
one: "%{count} tag will be deleted: %{tags}"
other: "%{count} tags will be deleted: %{tags}"
delete_unused_confirmation_more_tags:
one: "%{tags} and %{count} more"
other: "%{tags} and %{count} more"
delete_unused: "Delete Unused Tags"
delete_unused_description: "Delete all tags which are not attached to any topics or personal messages"
cancel_delete_unused: "Cancel"