Add translation for visible field config (#442)

This commit is contained in:
Louis Delbosc 2023-03-02 03:52:12 +01:00 committed by GitHub
parent e9d5ce0c60
commit 5af2cd4ef7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -198,7 +198,7 @@ export class VisibleFieldsConfig extends Disposable {
}); });
return [ return [
cssHeader( cssHeader(
cssFieldListHeader(dom.text((use) => `Visible ${use(this._fieldLabel)}`)), cssFieldListHeader(dom.text((use) => t("Visible {{label}}", {label: use(this._fieldLabel)}))),
dom.maybe( dom.maybe(
(use) => Boolean(use(use(this._section.viewFields).getObservable()).length), (use) => Boolean(use(use(this._section.viewFields).getObservable()).length),
() => ( () => (
@ -215,7 +215,7 @@ export class VisibleFieldsConfig extends Disposable {
dom.maybe(this._showVisibleBatchButtons, () => dom.maybe(this._showVisibleBatchButtons, () =>
cssRow( cssRow(
primaryButton( primaryButton(
dom.text((use) => `Hide ${use(this._fieldLabel)}`), dom.text((use) => t("Hide {{label}}", {label: use(this._fieldLabel)})),
dom.on('click', () => this._removeSelectedFields()), dom.on('click', () => this._removeSelectedFields()),
), ),
basicButton( basicButton(
@ -234,7 +234,7 @@ export class VisibleFieldsConfig extends Disposable {
testId('collapse-hidden'), testId('collapse-hidden'),
), ),
// TODO: show `hidden column` only when some fields are hidden // TODO: show `hidden column` only when some fields are hidden
cssFieldListHeader(dom.text((use) => `Hidden ${use(this._fieldLabel)}`)), cssFieldListHeader(dom.text((use) => t("Hidden {{label}}", {label: use(this._fieldLabel)}))),
dom.maybe( dom.maybe(
(use) => Boolean(use(this._hiddenFields.getObservable()).length && !use(this._collapseHiddenFields)), (use) => Boolean(use(this._hiddenFields.getObservable()).length && !use(this._collapseHiddenFields)),
() => ( () => (
@ -257,7 +257,7 @@ export class VisibleFieldsConfig extends Disposable {
dom.maybe(this._showHiddenBatchButtons, () => dom.maybe(this._showHiddenBatchButtons, () =>
cssRow( cssRow(
primaryButton( primaryButton(
dom.text((use) => `Show ${use(this._fieldLabel)}`), dom.text((use) => t("Show {{label}}", {label: use(this._fieldLabel)})),
dom.on('click', () => this._addSelectedFields()), dom.on('click', () => this._addSelectedFields()),
), ),
basicButton( basicButton(

View File

@ -688,7 +688,11 @@
"Cannot drop items into Hidden Fields": "Cannot drop items into Hidden Fields", "Cannot drop items into Hidden Fields": "Cannot drop items into Hidden Fields",
"Clear": "Clear", "Clear": "Clear",
"Hidden Fields cannot be reordered": "Hidden Fields cannot be reordered", "Hidden Fields cannot be reordered": "Hidden Fields cannot be reordered",
"Select All": "Select All" "Select All": "Select All",
"Visible {{label}}": "Visible {{label}}",
"Hide {{label}}": "Hide {{label}}",
"Hidden {{label}}": "Hidden {{label}}",
"Show {{label}}": "Show {{label}}"
}, },
"WelcomeQuestions": { "WelcomeQuestions": {
"Education": "Education", "Education": "Education",