diff --git a/webapp/app/components/translation-edit/helpers/component.ts b/webapp/app/components/translation-edit/helpers/component.ts index 40f06625f..5a4b38727 100644 --- a/webapp/app/components/translation-edit/helpers/component.ts +++ b/webapp/app/components/translation-edit/helpers/component.ts @@ -6,6 +6,8 @@ interface Args { export default class TranslationEditHelpers extends Component { get machineTranslationLanguages() { + if (!this.args.revisions) return []; + return this.args.revisions.map((revision: any) => ({ name: revision.name || revision.language.name, slug: revision.slug || revision.language.slug diff --git a/webapp/app/controllers/logged-in/project/translation/editions.ts b/webapp/app/controllers/logged-in/project/translation/editions.ts index f4bf31c82..0347d67c4 100644 --- a/webapp/app/controllers/logged-in/project/translation/editions.ts +++ b/webapp/app/controllers/logged-in/project/translation/editions.ts @@ -29,7 +29,7 @@ export default class TranslationEditionsController extends Controller { @readOnly('globalState.permissions') permissions: any; - @readOnly('model.revisionModel.project.revisions') + @readOnly('model.translationModel.revisions') revisions: any; @equal('model.translations', undefined) diff --git a/webapp/app/routes/logged-in/project/translation/editions.ts b/webapp/app/routes/logged-in/project/translation/editions.ts index b8a4b45d6..50d3ec402 100644 --- a/webapp/app/routes/logged-in/project/translation/editions.ts +++ b/webapp/app/routes/logged-in/project/translation/editions.ts @@ -31,7 +31,7 @@ export default class TranslationEditionsRoute extends Route { translationEditionsQuery, { props: (data) => ({ - revisionModel: this.modelFor('logged-in.project.revision'), + translationModel: this.modelFor('logged-in.project.translation'), project: data.viewer.project, prompts: data.viewer.project.prompts, translations: data.viewer.project.translation.editions diff --git a/webapp/app/templates/components/related-translations-list/item.hbs b/webapp/app/templates/components/related-translations-list/item.hbs index 02ef5796a..4e1632eeb 100644 --- a/webapp/app/templates/components/related-translations-list/item.hbs +++ b/webapp/app/templates/components/related-translations-list/item.hbs @@ -66,10 +66,10 @@ @onUpdateText={{fn this.onUpdateText}} /> + + {{t 'components.related_translations_list.save_button'}} + {{/unless}} - - {{t 'components.related_translations_list.save_button'}} - {{/component}} diff --git a/webapp/app/templates/components/translation-edit.hbs b/webapp/app/templates/components/translation-edit.hbs index b3a259cca..e909f193f 100644 --- a/webapp/app/templates/components/translation-edit.hbs +++ b/webapp/app/templates/components/translation-edit.hbs @@ -17,18 +17,20 @@ lang={{this.revisionSlug}} /> -
- -
+ {{#unless @translation.isRemoved}} +
+ +
+ {{/unless}} {{/if}}