diff --git a/cypress/utils/steps.js b/cypress/utils/steps.js index 5778b5af..4145e192 100644 --- a/cypress/utils/steps.js +++ b/cypress/utils/steps.js @@ -145,8 +145,10 @@ function deleteWorkflowEntry({ title }) { assertNotification(notifications.deletedUnpublished); } +const STATUS_BUTTON_TEXT = 'Status:'; + function assertWorkflowStatusInEditor(status) { - cy.contains('[role="button"]', 'Set status').as('setStatusButton'); + cy.contains('[role="button"]', STATUS_BUTTON_TEXT).as('setStatusButton'); cy.get('@setStatusButton') .parent() .within(() => { @@ -209,7 +211,7 @@ function assertWorkflowStatus({ title }, status) { } function updateWorkflowStatusInEditor(newStatus) { - selectDropdownItem('Set status', newStatus); + selectDropdownItem(STATUS_BUTTON_TEXT, newStatus); assertNotification(notifications.updated); } diff --git a/packages/netlify-cms-core/src/components/Editor/EditorToolbar.js b/packages/netlify-cms-core/src/components/Editor/EditorToolbar.js index 8609af58..581ab5b4 100644 --- a/packages/netlify-cms-core/src/components/Editor/EditorToolbar.js +++ b/packages/netlify-cms-core/src/components/Editor/EditorToolbar.js @@ -358,18 +358,23 @@ export class EditorToolbar extends React.Component { renderWorkflowStatusControls = () => { const { isUpdatingStatus, onChangeStatus, currentStatus, t, useOpenAuthoring } = this.props; + + const statusToTranslation = { + [status.get('DRAFT')]: t('editor.editorToolbar.draft'), + [status.get('PENDING_REVIEW')]: t('editor.editorToolbar.inReview'), + [status.get('PENDING_PUBLISH')]: t('editor.editorToolbar.ready'), + }; + + const buttonText = isUpdatingStatus + ? t('editor.editorToolbar.updating') + : t('editor.editorToolbar.status', { status: statusToTranslation[currentStatus] }); + return ( <> ( - - {isUpdatingStatus - ? t('editor.editorToolbar.updating') - : t('editor.editorToolbar.setStatus')} - - )} + renderButton={() => {buttonText}} >
- editor.editorToolbar.setStatus + editor.editorToolbar.status
@@ -803,7 +803,7 @@ exports[`EditorToolbar should render with status=draft,useOpenAuthoring=true 1`] class="emotion-30 emotion-31" >
- editor.editorToolbar.setStatus + editor.editorToolbar.status
- editor.editorToolbar.setStatus + editor.editorToolbar.status
@@ -1447,7 +1447,7 @@ exports[`EditorToolbar should render with status=pending_publish,useOpenAuthorin class="emotion-28 emotion-29" >
- editor.editorToolbar.setStatus + editor.editorToolbar.status
- editor.editorToolbar.setStatus + editor.editorToolbar.status
@@ -2104,7 +2104,7 @@ exports[`EditorToolbar should render with status=pending_review,useOpenAuthoring class="emotion-30 emotion-31" >
- editor.editorToolbar.setStatus + editor.editorToolbar.status
{ diff --git a/packages/netlify-cms-locales/src/bg/index.js b/packages/netlify-cms-locales/src/bg/index.js index 199d79ef..5af3b0e8 100644 --- a/packages/netlify-cms-locales/src/bg/index.js +++ b/packages/netlify-cms-locales/src/bg/index.js @@ -135,7 +135,7 @@ const bg = { save: 'Запази', deleting: 'Изтриване...', updating: 'Актуализиране...', - setStatus: 'Задайте състояние', + status: 'Cъстояние: %{status}', backCollection: 'Записване в %{collectionLabel} колекция', unsavedChanges: 'Незапазени Промени', changesSaved: 'Запазени промени', diff --git a/packages/netlify-cms-locales/src/ca/index.js b/packages/netlify-cms-locales/src/ca/index.js index 94458c98..88c1a9be 100644 --- a/packages/netlify-cms-locales/src/ca/index.js +++ b/packages/netlify-cms-locales/src/ca/index.js @@ -134,7 +134,7 @@ const ca = { save: 'Guardar', deleting: 'Eliminant...', updating: 'Actualizant...', - setStatus: 'Actualizar estat', + status: 'Estat: %{status}', backCollection: ' Escrivint a la colecció %{collectionLabel}', unsavedChanges: 'Canvis no guardats', changesSaved: 'Canvis guardats', diff --git a/packages/netlify-cms-locales/src/cs/index.js b/packages/netlify-cms-locales/src/cs/index.js index 295d81a0..2e635fc4 100644 --- a/packages/netlify-cms-locales/src/cs/index.js +++ b/packages/netlify-cms-locales/src/cs/index.js @@ -134,7 +134,7 @@ const cs = { save: 'Uložit', deleting: 'Vymazávání…', updating: 'Aktualizace…', - setStatus: 'Změnit status', + status: 'Status: %{status}', backCollection: ' Píšete v kolekci %{collectionLabel}', unsavedChanges: 'Neuložené změny', changesSaved: 'Změny uloženy', diff --git a/packages/netlify-cms-locales/src/da/index.js b/packages/netlify-cms-locales/src/da/index.js index 22364113..30e87e60 100644 --- a/packages/netlify-cms-locales/src/da/index.js +++ b/packages/netlify-cms-locales/src/da/index.js @@ -131,7 +131,7 @@ const da = { save: 'Gem', deleting: 'Sletter...', updating: 'Updaterer...', - setStatus: 'Sæt status', + status: 'Status: %{status}', backCollection: ' Skriver til %{collectionLabel} samlingen', unsavedChanges: 'Ugemte ændringer', changesSaved: 'Ændringer gemt', diff --git a/packages/netlify-cms-locales/src/de/index.js b/packages/netlify-cms-locales/src/de/index.js index 96451bf8..e6264e7f 100644 --- a/packages/netlify-cms-locales/src/de/index.js +++ b/packages/netlify-cms-locales/src/de/index.js @@ -126,7 +126,7 @@ const de = { save: 'Speichern', deleting: 'Löschen...', updating: 'Aktualisieren...', - setStatus: 'Status setzen', + status: 'Status: %{status}', backCollection: 'Zurück zu allen %{collectionLabel}', unsavedChanges: 'Ungespeicherte Änderungen', changesSaved: 'Änderungen gespeichert', diff --git a/packages/netlify-cms-locales/src/en/index.js b/packages/netlify-cms-locales/src/en/index.js index b154d12b..c8eda3e9 100644 --- a/packages/netlify-cms-locales/src/en/index.js +++ b/packages/netlify-cms-locales/src/en/index.js @@ -137,7 +137,7 @@ const en = { 'Entry is being reviewed, no further actions are required. However, you can still make additional changes while it is being reviewed.', deleting: 'Deleting...', updating: 'Updating...', - setStatus: 'Set status', + status: 'Status: %{status}', backCollection: ' Writing in %{collectionLabel} collection', unsavedChanges: 'Unsaved Changes', changesSaved: 'Changes saved', diff --git a/packages/netlify-cms-locales/src/es/index.js b/packages/netlify-cms-locales/src/es/index.js index 5ed8d663..d8d1558e 100644 --- a/packages/netlify-cms-locales/src/es/index.js +++ b/packages/netlify-cms-locales/src/es/index.js @@ -115,7 +115,7 @@ const es = { save: 'Guardar', deleting: 'Eliminando...', updating: 'Actualizando...', - setStatus: 'Actualizar estado', + status: 'Estado: %{status}', backCollection: ' Escribiendo en la colección %{collectionLabel}', unsavedChanges: 'Cambios no guardados', changesSaved: 'Cambios guardados', diff --git a/packages/netlify-cms-locales/src/fr/index.js b/packages/netlify-cms-locales/src/fr/index.js index 48cdd862..6d123f18 100644 --- a/packages/netlify-cms-locales/src/fr/index.js +++ b/packages/netlify-cms-locales/src/fr/index.js @@ -136,7 +136,7 @@ const fr = { save: 'Enregistrer', deleting: 'Suppression...', updating: 'Mise à jour...', - setStatus: 'Définir le statut', + status: 'Statut: %{status}', backCollection: ' Écriture dans la collection %{collectionLabel}', unsavedChanges: 'Modifications non enregistrées', changesSaved: 'Modifications enregistrées', diff --git a/packages/netlify-cms-locales/src/gr/index.js b/packages/netlify-cms-locales/src/gr/index.js index e0c1d384..9b52888c 100644 --- a/packages/netlify-cms-locales/src/gr/index.js +++ b/packages/netlify-cms-locales/src/gr/index.js @@ -101,7 +101,7 @@ const gr = { save: 'Αποθήκευση', deleting: 'Διαγραφή...', updating: 'Ενημέρωση...', - setStatus: 'Ορισμός κατάστασης', + status: 'Κατάστασης: %{status}', backCollection: ' Εγγραφή στη συλλογή %{collectionLabel}', unsavedChanges: 'Μη αποθηκευμένες αλλαγές', changesSaved: 'Αλλαγές που αποθηκεύτηκαν', diff --git a/packages/netlify-cms-locales/src/hr/index.js b/packages/netlify-cms-locales/src/hr/index.js index 3690a455..a93a6862 100644 --- a/packages/netlify-cms-locales/src/hr/index.js +++ b/packages/netlify-cms-locales/src/hr/index.js @@ -130,7 +130,7 @@ const hr = { save: 'Spremi', deleting: 'Brisanje...', updating: 'Ažuriranje...', - setStatus: 'Postavi status', + status: 'Status: %{status}', backCollection: 'Pisanje u %{collectionLabel} zbirci', unsavedChanges: 'Nespremljene promjene', changesSaved: 'Promjene spremljene', diff --git a/packages/netlify-cms-locales/src/hu/index.js b/packages/netlify-cms-locales/src/hu/index.js index 4286cb8c..baea056c 100644 --- a/packages/netlify-cms-locales/src/hu/index.js +++ b/packages/netlify-cms-locales/src/hu/index.js @@ -85,7 +85,7 @@ const hu = { save: 'Mentés', deleting: 'Törlés...', updating: 'Frissítés...', - setStatus: 'Állapot beállitása', + status: 'Beállitása: %{status}', backCollection: ' Írás a %{collectionLabel} gyűjteménybe', unsavedChanges: 'Nemmentett változtatások', changesSaved: 'Változások elmentve', diff --git a/packages/netlify-cms-locales/src/it/index.js b/packages/netlify-cms-locales/src/it/index.js index ecabba1e..ef72c4bf 100644 --- a/packages/netlify-cms-locales/src/it/index.js +++ b/packages/netlify-cms-locales/src/it/index.js @@ -98,7 +98,7 @@ const it = { save: 'Salva', deleting: 'Cancellando...', updating: 'Aggiornando...', - setStatus: 'Imposta status', + status: 'Status: %{status}', backCollection: ' Scrivendo nella sezione %{collectionLabel}', unsavedChanges: 'Modifiche non salvate', changesSaved: 'Modifiche salvate', diff --git a/packages/netlify-cms-locales/src/ja/index.js b/packages/netlify-cms-locales/src/ja/index.js index 17f56378..dd7a627d 100644 --- a/packages/netlify-cms-locales/src/ja/index.js +++ b/packages/netlify-cms-locales/src/ja/index.js @@ -134,7 +134,7 @@ const ja = { save: '保存', deleting: '削除しています...', updating: '更新しています...', - setStatus: 'ステータスを変更する', + status: 'ステータスを: %{status}', backCollection: '%{collectionLabel}のエントリを作成中', unsavedChanges: '未保存', changesSaved: '保存済', diff --git a/packages/netlify-cms-locales/src/ko/index.js b/packages/netlify-cms-locales/src/ko/index.js index 3db20da0..96a139b2 100644 --- a/packages/netlify-cms-locales/src/ko/index.js +++ b/packages/netlify-cms-locales/src/ko/index.js @@ -122,7 +122,7 @@ const ko = { save: '저장', deleting: '삭제 중...', updating: '업데이트 중...', - setStatus: '상태 설정', + status: '상태: %{status}', backCollection: '%{collectionLabel} 컬랙션에 작성하는 중', unsavedChanges: '변경사항 저장되지 않음', changesSaved: '변경사항 저장됨', diff --git a/packages/netlify-cms-locales/src/lt/index.js b/packages/netlify-cms-locales/src/lt/index.js index 11f2874e..d22811ec 100644 --- a/packages/netlify-cms-locales/src/lt/index.js +++ b/packages/netlify-cms-locales/src/lt/index.js @@ -132,7 +132,7 @@ const lt = { save: 'Išsaugoti', deleting: 'Trinama...', updating: 'Atnaujinama...', - setStatus: 'Nustatyti statusą', + status: 'Statusą: %{status}', backCollection: ' Rašoma %{collectionLabel} kolekcijoje', unsavedChanges: 'Neišsaugoti pakeitimai', changesSaved: 'Pakeitimai išsauogti', diff --git a/packages/netlify-cms-locales/src/nb_no/index.js b/packages/netlify-cms-locales/src/nb_no/index.js index 8f8bd6e7..72ce9faa 100644 --- a/packages/netlify-cms-locales/src/nb_no/index.js +++ b/packages/netlify-cms-locales/src/nb_no/index.js @@ -112,7 +112,7 @@ const nb_no = { save: 'Lagre', deleting: 'Sletter...', updating: 'Oppdaterer...', - setStatus: 'Sett status', + status: 'Status: %{status}', backCollection: ' Skriver i samlingen %{collectionLabel}', unsavedChanges: 'Ulagrede endringer', changesSaved: 'Endringer lagret', diff --git a/packages/netlify-cms-locales/src/nl/index.js b/packages/netlify-cms-locales/src/nl/index.js index 0be48649..2a469d6d 100644 --- a/packages/netlify-cms-locales/src/nl/index.js +++ b/packages/netlify-cms-locales/src/nl/index.js @@ -133,7 +133,7 @@ const nl = { save: 'Opslaan', deleting: 'Verwijderen...', updating: 'Bijwerken...', - setStatus: 'Stel status in', + status: 'Status: %{status}', backCollection: ' Terug naar %{collectionLabel}', unsavedChanges: 'Niet-opgeslagen wijzigingen', changesSaved: 'Wijzigingen opgeslagen', diff --git a/packages/netlify-cms-locales/src/nn_no/index.js b/packages/netlify-cms-locales/src/nn_no/index.js index eb86d57b..6be99524 100644 --- a/packages/netlify-cms-locales/src/nn_no/index.js +++ b/packages/netlify-cms-locales/src/nn_no/index.js @@ -113,7 +113,7 @@ const nn_no = { save: 'Lagre', deleting: 'Slettar...', updating: 'Oppdaterer...', - setStatus: 'Sett status', + status: 'Status: %{status}', backCollection: ' Skriv i samlinga %{collectionLabel}', unsavedChanges: 'Ulagra endringar', changesSaved: 'Endringar lagret', diff --git a/packages/netlify-cms-locales/src/pl/index.js b/packages/netlify-cms-locales/src/pl/index.js index a5b18bf9..f23cf5d7 100644 --- a/packages/netlify-cms-locales/src/pl/index.js +++ b/packages/netlify-cms-locales/src/pl/index.js @@ -113,7 +113,7 @@ const pl = { save: 'Zapisz', deleting: 'Usuwanie...', updating: 'Uaktualnianie...', - setStatus: 'Ustaw status', + status: 'Status: %{status}', backCollection: ' Edycja treści w zbiorze %{collectionLabel}', unsavedChanges: 'Niezapisane zmiany', changesSaved: 'Zmiany zapisane', diff --git a/packages/netlify-cms-locales/src/pt/index.js b/packages/netlify-cms-locales/src/pt/index.js index 9c26520d..199347d4 100644 --- a/packages/netlify-cms-locales/src/pt/index.js +++ b/packages/netlify-cms-locales/src/pt/index.js @@ -121,7 +121,7 @@ const pt = { save: 'Salvar', deleting: 'Excluindo...', updating: 'Atualizando...', - setStatus: 'Definir status', + status: 'Status: %{status}', backCollection: ' Escrevendo na coleção %{collectionLabel}', unsavedChanges: 'Alterações não salvas', changesSaved: 'Alterações salvas', diff --git a/packages/netlify-cms-locales/src/ro/index.js b/packages/netlify-cms-locales/src/ro/index.js index 57c485ae..266101b5 100644 --- a/packages/netlify-cms-locales/src/ro/index.js +++ b/packages/netlify-cms-locales/src/ro/index.js @@ -136,7 +136,7 @@ const ro = { save: 'Salvează', deleting: 'Se șterge...', updating: 'Se actualizează...', - setStatus: 'Setează status', + status: 'Status: %{status}', backCollection: ' Scrii în colecția „%{collectionLabel}”', unsavedChanges: 'Modificări nesalvate', changesSaved: 'Modificări salvate', diff --git a/packages/netlify-cms-locales/src/ru/index.js b/packages/netlify-cms-locales/src/ru/index.js index 532403b2..b39d0249 100644 --- a/packages/netlify-cms-locales/src/ru/index.js +++ b/packages/netlify-cms-locales/src/ru/index.js @@ -131,7 +131,7 @@ const ru = { save: 'Сохранить', deleting: 'Удаление…', updating: 'Обновление…', - setStatus: 'Установить статус', + status: 'Cтатус: %{status}', backCollection: 'Запись в коллекцию %{collectionLabel}', unsavedChanges: 'Несохраненные изменения', changesSaved: 'Изменения сохранены', diff --git a/packages/netlify-cms-locales/src/sv/index.js b/packages/netlify-cms-locales/src/sv/index.js index eb4144f4..ef63f30e 100644 --- a/packages/netlify-cms-locales/src/sv/index.js +++ b/packages/netlify-cms-locales/src/sv/index.js @@ -135,7 +135,7 @@ const sv = { save: 'Spara', deleting: 'Raderar...', updating: 'Updaterar...', - setStatus: 'Sätt status', + status: 'Status: %{status}', backCollection: ' Redigerar i samlingen %{collectionLabel}', unsavedChanges: 'Osparade ändringar', changesSaved: 'Ändringar sparade', diff --git a/packages/netlify-cms-locales/src/th/index.js b/packages/netlify-cms-locales/src/th/index.js index 750e6c11..d71b828d 100644 --- a/packages/netlify-cms-locales/src/th/index.js +++ b/packages/netlify-cms-locales/src/th/index.js @@ -123,7 +123,7 @@ const th = { save: 'บันทึก', deleting: 'กำลังลบ...', updating: 'กำลังอัปเดต...', - setStatus: 'เซ็ตสถานะ', + status: 'สถานะ: %{status}', backCollection: ' เขียนในกลุ่ม %{collectionLabel}', unsavedChanges: 'การเปลี่ยนแปลงยังไม่ได้บันทึก', changesSaved: 'การเปลี่ยนเปลงถูกบันทึกแล้ว', diff --git a/packages/netlify-cms-locales/src/tr/index.js b/packages/netlify-cms-locales/src/tr/index.js index ce499747..34d07bcc 100644 --- a/packages/netlify-cms-locales/src/tr/index.js +++ b/packages/netlify-cms-locales/src/tr/index.js @@ -103,7 +103,7 @@ const tr = { save: 'Kayıt Et', deleting: 'Siliniyor...', updating: 'Güncelleniyor...', - setStatus: 'Durumu ayarla', + status: 'Durumu: %{status}', backCollection: '%{collectionLabel} koleksiyonunda yazılı', unsavedChanges: 'Kaydedilmemiş Değişiklikler', changesSaved: 'Değişiklikler kaydedildi', diff --git a/packages/netlify-cms-locales/src/uk/index.js b/packages/netlify-cms-locales/src/uk/index.js index c1fafa52..3a2cd58b 100644 --- a/packages/netlify-cms-locales/src/uk/index.js +++ b/packages/netlify-cms-locales/src/uk/index.js @@ -79,7 +79,7 @@ const uk = { save: 'Зберегти', deleting: 'Видалення...', updating: 'Оновлення...', - setStatus: 'Змінити стан', + status: 'Cтан: %{status}', backCollection: ' Робота над %{collectionLabel} колекцією', unsavedChanges: 'Незбережені зміни', changesSaved: 'Зміни збережено', diff --git a/packages/netlify-cms-locales/src/vi/index.js b/packages/netlify-cms-locales/src/vi/index.js index 9b578954..2925ab1f 100644 --- a/packages/netlify-cms-locales/src/vi/index.js +++ b/packages/netlify-cms-locales/src/vi/index.js @@ -121,7 +121,7 @@ const vi = { save: 'Lưu', deleting: 'Đang xoá...', updating: 'Đang cập nhật...', - setStatus: 'Đặt trạng thái', + status: 'Trạng: %{status}', backCollection: ' Đang viết trong bộ sưu tập %{collectionLabel}', unsavedChanges: 'Thay đổi chưa được lưu', changesSaved: 'Thay đổi đã được lưu', diff --git a/packages/netlify-cms-locales/src/zh_Hans/index.js b/packages/netlify-cms-locales/src/zh_Hans/index.js index ccd5501d..c54a8b65 100644 --- a/packages/netlify-cms-locales/src/zh_Hans/index.js +++ b/packages/netlify-cms-locales/src/zh_Hans/index.js @@ -131,7 +131,7 @@ const zh_Hans = { save: '保存', deleting: '正在删除...', updating: '正在更新...', - setStatus: '设置状态', + status: '状态: %{status}', backCollection: '正在集合“%{collectionLabel}”中编写', unsavedChanges: '含未保存的修改', changesSaved: '修改已保存', diff --git a/packages/netlify-cms-locales/src/zh_Hant/index.js b/packages/netlify-cms-locales/src/zh_Hant/index.js index 3ca0f81b..531faefa 100644 --- a/packages/netlify-cms-locales/src/zh_Hant/index.js +++ b/packages/netlify-cms-locales/src/zh_Hant/index.js @@ -120,7 +120,7 @@ const zh_Hant = { save: '儲存', deleting: '刪除中...', updating: '更新中...', - setStatus: '設定狀態', + status: '狀態: %{status}', backCollection: '在集合 %{collectionLabel} 新增內容', unsavedChanges: '未儲存變更', changesSaved: '已儲存變更',