Merge pull request #486 from nextcloud/fix-481

Don't double-encode placeholders
This commit is contained in:
Raimund Schlüßler 2019-07-08 21:56:32 +02:00 committed by GitHub
commit 7e71e4e0c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 12 deletions

View file

@ -33,14 +33,13 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
<div v-if="completedTasksCount">
<h3 class="delete-completed__header">
{{ n('tasks',
'This will delete {taskCount} completed task and its subtasks from calendar "{calendarName}".',
'This will delete {taskCount} completed tasks and their subtasks from calendar "{calendarName}".',
'This will delete {taskCount} completed task and its subtasks from calendar "%s".',
'This will delete {taskCount} completed tasks and their subtasks from calendar "%s".',
initialCompletedRootTasksCount,
{
taskCount: initialCompletedRootTasksCount,
calendarName: calendar.displayName
taskCount: initialCompletedRootTasksCount
}
) }}
).replace('%s', calendar.displayName) }}
</h3>
<button class="delete-completed__button icon-delete" type="button"
@click="deleteCompletedTasks"
@ -50,7 +49,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
</div>
<div v-else>
<h3 class="delete-completed__header">
{{ t('tasks', 'Deleted all completed tasks from calendar "{calendarName}".', {calendarName: calendar.displayName}) }}
{{ t('tasks', 'Deleted all completed tasks from calendar "%s".').replace('%s', calendar.displayName) }}
</h3>
</div>
<div>

View file

@ -206,7 +206,7 @@ export default {
* @returns {String} the placeholder string to show
*/
subtasksCreationPlaceholder: function() {
return t('tasks', 'Add a subtask to "{task}"…', { task: this.task.summary })
return t('tasks', 'Add a subtask to "%s"…').replace('%s', this.task.summary)
},
/**

View file

@ -115,7 +115,7 @@ export default {
},
inputString: function() {
return t('tasks', 'Add a task to "{calendar}"...', { calendar: this.calendar.displayName })
return t('tasks', 'Add a task to "%s"...').replace('%s', this.calendar.displayName)
},
/**

View file

@ -116,13 +116,13 @@ export default {
inputString: function() {
switch (this.collectionId) {
case 'starred':
return t('tasks', 'Add an important task to "{calendar}"…', { calendar: this.calendar.displayName })
return t('tasks', 'Add an important task to "%s"…').replace('%s', this.calendar.displayName)
case 'today':
return t('tasks', 'Add a task due today to "{calendar}"…', { calendar: this.calendar.displayName })
return t('tasks', 'Add a task due today to "%s"…').replace('%s', this.calendar.displayName)
case 'current':
return t('tasks', 'Add a current task to "{calendar}"…', { calendar: this.calendar.displayName })
return t('tasks', 'Add a current task to "%s"…').replace('%s', this.calendar.displayName)
default:
return t('tasks', 'Add a task to "{calendar}"…', { calendar: this.calendar.displayName })
return t('tasks', 'Add a task to "%s"…').replace('%s', this.calendar.displayName)
}
},
...mapGetters({