FIX: Use <textarea> for theme translations (#14322)

Translations are often multi-line. Using a regular `<input>` doesn't allow newlines, so if you try to edit a multiline theme translation, all the line breaks will be removed.

This commit updates the theme translations UI to use `<textarea>`, just like the core translation editing UI.
This commit is contained in:
David Taylor 2021-09-13 18:57:19 +01:00 committed by GitHub
parent a03d8a147f
commit 928f000b4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -146,7 +146,9 @@ export default Controller.extend({
@discourseComputed("model.translations") @discourseComputed("model.translations")
translations(translations) { translations(translations) {
return translations.map((setting) => ThemeSettings.create(setting)); return translations.map((setting) =>
ThemeSettings.create({ ...setting, textarea: true })
);
}, },
hasTranslations: notEmpty("translations"), hasTranslations: notEmpty("translations"),

View File

@ -345,6 +345,10 @@
padding-bottom: 0; padding-bottom: 0;
margin-top: 18px; margin-top: 18px;
min-height: 35px; min-height: 35px;
.input-setting-textarea {
height: unset;
}
} }
.setting-label { .setting-label {
width: 25%; width: 25%;