refactor localized text rendering in tooltips, flash messages

This commit is contained in:
Martin Raifer
2022-06-23 18:24:48 +02:00
parent 422861dbc7
commit ac77289b4d
47 changed files with 156 additions and 128 deletions
+8 -5
View File
@@ -329,7 +329,9 @@ export function uiCommit(context) {
if (!labelEnter.empty()) {
labelEnter
.call(uiTooltip().title(t.html('commit.request_review_info')).placement('top'));
.call(uiTooltip()
.title(() => t.append('commit.request_review_info'))
.placement('top'));
}
labelEnter
@@ -405,7 +407,9 @@ export function uiCommit(context) {
if (uploadBlockerTooltipText) {
buttonSection.selectAll('.save-button')
.call(uiTooltip().title(uploadBlockerTooltipText).placement('top'));
.call(uiTooltip()
.title(() => uploadBlockerTooltipText)
.placement('top'));
}
// Raw Tag Editor
@@ -453,12 +457,11 @@ export function uiCommit(context) {
.getIssuesBySeverity({ what: 'edited', where: 'all' }).error;
if (errors.length) {
return t('commit.outstanding_errors_message', { count: errors.length });
return t.append('commit.outstanding_errors_message', { count: errors.length });
} else {
var hasChangesetComment = context.changeset && context.changeset.tags.comment && context.changeset.tags.comment.trim().length;
if (!hasChangesetComment) {
return t('commit.comment_needed_message');
return t.append('commit.comment_needed_message');
}
}
return null;