mirror of
https://github.com/flarum/framework.git
synced 2025-01-20 03:52:46 +08:00
Update for ICU MessageFormat
This commit is contained in:
parent
b6113169f8
commit
d69b3fbb12
|
@ -12,7 +12,7 @@ export default function() {
|
|||
|
||||
return SettingDropdown.component({
|
||||
defaultLabel: minutes
|
||||
? app.translator.transChoice('core.admin.permissions_controls.allow_some_minutes_button', minutes, {count: minutes})
|
||||
? app.translator.trans('core.admin.permissions_controls.allow_some_minutes_button', {count: minutes})
|
||||
: app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button'),
|
||||
key: 'allow_tag_change',
|
||||
options: [
|
||||
|
|
|
@ -38,14 +38,14 @@ export default class DiscussionTaggedPost extends EventPost {
|
|||
const data = {};
|
||||
|
||||
if (this.attrs.tagsAdded.length) {
|
||||
data.tagsAdded = app.translator.transChoice('flarum-tags.forum.post_stream.tags_text', this.attrs.tagsAdded.length, {
|
||||
data.tagsAdded = app.translator.trans('flarum-tags.forum.post_stream.tags_text', {
|
||||
tags: tagsLabel(this.attrs.tagsAdded, {link: true}),
|
||||
count: this.attrs.tagsAdded.length
|
||||
});
|
||||
}
|
||||
|
||||
if (this.attrs.tagsRemoved.length) {
|
||||
data.tagsRemoved = app.translator.transChoice('flarum-tags.forum.post_stream.tags_text', this.attrs.tagsRemoved.length, {
|
||||
data.tagsRemoved = app.translator.trans('flarum-tags.forum.post_stream.tags_text', {
|
||||
tags: tagsLabel(this.attrs.tagsRemoved, {link: true}),
|
||||
count: this.attrs.tagsRemoved.length
|
||||
});
|
||||
|
|
|
@ -111,10 +111,10 @@ export default class TagDiscussionModal extends Modal {
|
|||
getInstruction(primaryCount, secondaryCount) {
|
||||
if (primaryCount < this.minPrimary) {
|
||||
const remaining = this.minPrimary - primaryCount;
|
||||
return app.translator.transChoice('flarum-tags.forum.choose_tags.choose_primary_placeholder', remaining, {count: remaining});
|
||||
return app.translator.trans('flarum-tags.forum.choose_tags.choose_primary_placeholder', {count: remaining});
|
||||
} else if (secondaryCount < this.minSecondary) {
|
||||
const remaining = this.minSecondary - secondaryCount;
|
||||
return app.translator.transChoice('flarum-tags.forum.choose_tags.choose_secondary_placeholder', remaining, {count: remaining});
|
||||
return app.translator.trans('flarum-tags.forum.choose_tags.choose_secondary_placeholder', {count: remaining});
|
||||
}
|
||||
|
||||
return '';
|
||||
|
|
|
@ -66,8 +66,8 @@ flarum-tags:
|
|||
|
||||
# These translations are used by the Choose Tags modal dialog.
|
||||
choose_tags:
|
||||
choose_primary_placeholder: "Choose a primary tag|Choose {count} primary tags"
|
||||
choose_secondary_placeholder: "Choose 1 more tag|Choose {count} more tags"
|
||||
choose_primary_placeholder: "{count, plural, one {Choose a primary tag} other {Choose # primary tags}}"
|
||||
choose_secondary_placeholder: "{count, plural, one {Choose 1 more tag} other {Choose # more tags}}"
|
||||
edit_title: "Edit Tags for {title}"
|
||||
submit_button: => core.ref.okay
|
||||
title: Choose Tags for Your Discussion
|
||||
|
@ -94,7 +94,7 @@ flarum-tags:
|
|||
added_and_removed_tags_text: "{username} added the {tagsAdded} and removed the {tagsRemoved}."
|
||||
added_tags_text: "{username} added the {tagsAdded}."
|
||||
removed_tags_text: "{username} removed the {tagsRemoved}."
|
||||
tags_text: "{tags} tag|{tags} tags"
|
||||
tags_text: "{count, plural, one {# tag} other {# tags}}"
|
||||
|
||||
# These translations are used when visiting a single tag's discussion list.
|
||||
tag:
|
||||
|
|
Loading…
Reference in New Issue
Block a user