Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions core/i18n/resources/en/appErrors.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export default {
updateSelfAndDependentsDefaultValues:
'$t(appErrors:record.errorUpdating); error evaluating expression in node {{nodeDefName}}: {{details}}',
},
recordPrintableExport: {
missingEntityParams: 'Current page export requires entityDefUuid and entityNodeUuid',
entityNotFound: 'Entity not found for the specified export',
},
sessionExpiredRefreshPage: `Session could have expired.
Try to refresh the page.`,
survey: {
Expand Down
12 changes: 12 additions & 0 deletions core/i18n/resources/en/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,18 @@ $t(common.appNameFull)
basic: 'Basic',
advanced: 'Advanced',
mobileApp: 'Mobile App',
print: 'Print',
printProps: {
printOrientation: {
label: 'Page orientation',
info: 'Orientation used when this entity starts its own printable section. Default inherits the document orientation chosen at export.',
},
orientations: {
default: 'Default (document)',
portrait: 'Portrait',
landscape: 'Landscape',
},
},
validations: 'Validations',
function: 'Function',
editingFunction: 'Editing function {{functionName}}',
Expand Down
23 changes: 23 additions & 0 deletions core/i18n/resources/en/surveyForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,29 @@ In Arena Mobile:
confirmNodeDelete: 'Are you sure you want to delete this {{nodeDefType}} ({{nodeDefLabel}})?',
downloadPrintableDocument: 'Download printable document (Word)',
downloadPrintableDocumentPdf: 'Download printable document (PDF)',
printableExport: {
title: 'Export printable document',
exportDocument: 'Export Document',
format: 'Format',
formats: {
pdf: 'PDF',
docx: 'Word',
},
scope: 'Content',
scopes: {
full: 'Full survey',
currentPage: 'Current page only',
},
currentPageHint: 'Current page: {{entityLabel}}',
currentPageUnavailable:
'Unable to determine the current page instance. Navigate to a specific page or export the full survey.',
orientation: 'Page orientation',
orientations: {
portrait: 'Portrait',
landscape: 'Landscape',
},
download: 'Download',
},
exportLabels_csv: 'Export labels (CSV)',
exportLabels_xlsx: 'Export labels (Excel)',
importLabels: 'Import labels from Excel or CSV',
Expand Down
12 changes: 12 additions & 0 deletions core/i18n/resources/es/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,18 @@ $t(common.appNameFull)
basic: 'Básico',
advanced: 'Avanzado',
mobileApp: 'Aplicación móvil',
print: 'Impresión',
printProps: {
printOrientation: {
label: 'Orientación de página',
info: 'Orientación usada cuando esta entidad inicia su propia sección imprimible. Por defecto se hereda la orientación del documento elegida en la exportación.',
},
orientations: {
default: 'Predeterminada (documento)',
portrait: 'Vertical',
landscape: 'Horizontal',
},
},
validations: 'Validaciones',
function: 'Función',
editingFunction: 'Editando función {{functionName}}',
Expand Down
23 changes: 23 additions & 0 deletions core/i18n/resources/es/surveyForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,29 @@ En Arena Mobile:
confirmNodeDelete: '¿Está seguro de que desea eliminar este {{nodeDefType}} ({{nodeDefLabel}})?',
downloadPrintableDocument: 'Descargar documento imprimible (Word)',
downloadPrintableDocumentPdf: 'Descargar documento imprimible (PDF)',
printableExport: {
title: 'Exportar documento imprimible',
exportDocument: 'Exportar documento',
format: 'Formato',
formats: {
pdf: 'PDF',
docx: 'Word',
},
scope: 'Contenido',
scopes: {
full: 'Encuesta completa',
currentPage: 'Solo página actual',
},
currentPageHint: 'Página actual: {{entityLabel}}',
currentPageUnavailable:
'No se puede determinar la instancia de la página actual. Navegue a una página específica o exporte la encuesta completa.',
orientation: 'Orientación de página',
orientations: {
portrait: 'Vertical',
landscape: 'Horizontal',
},
download: 'Descargar',
},
exportLabels_csv: 'Exportar etiquetas (CSV)',
exportLabels_xlsx: 'Exportar etiquetas (Excel)',
importLabels: 'Importar etiquetas desde Excel o CSV',
Expand Down
12 changes: 12 additions & 0 deletions core/i18n/resources/fr/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,18 @@ $t(common.appNameFull)
basic: 'Basique',
advanced: 'Avancé',
mobileApp: 'Application mobile',
print: 'Impression',
printProps: {
printOrientation: {
label: 'Orientation de la page',
info: "Orientation utilisée lorsque cette entité commence sa propre section imprimable. Par défaut, hérite de l'orientation du document choisie lors de l'export.",
},
orientations: {
default: 'Par défaut (document)',
portrait: 'Portrait',
landscape: 'Paysage',
},
},
validations: 'Validations',
function: 'Fonction',
editingFunction: 'Modification de la fonction {{functionName}}',
Expand Down
23 changes: 23 additions & 0 deletions core/i18n/resources/fr/surveyForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,29 @@ Dans Arena Mobile :
confirmNodeDelete: 'Êtes-vous sûr(e) de vouloir supprimer ce {{nodeDefType}} ({{nodeDefLabel}}) ?',
downloadPrintableDocument: 'Télécharger le document imprimable (Word)',
downloadPrintableDocumentPdf: 'Télécharger le document imprimable (PDF)',
printableExport: {
title: 'Exporter le document imprimable',
exportDocument: 'Exporter le document',
format: 'Format',
formats: {
pdf: 'PDF',
docx: 'Word',
},
scope: 'Contenu',
scopes: {
full: 'Formulaire complet',
currentPage: 'Page actuelle uniquement',
},
currentPageHint: 'Page actuelle : {{entityLabel}}',
currentPageUnavailable:
"Impossible de déterminer l'instance de la page actuelle. Naviguez vers une page spécifique ou exportez le formulaire complet.",
orientation: 'Orientation de la page',
orientations: {
portrait: 'Portrait',
landscape: 'Paysage',
},
download: 'Télécharger',
},
exportLabels_csv: 'Exporter les étiquettes (CSV)',
exportLabels_xlsx: 'Exporter les étiquettes (Excel)',
importLabels: 'Importer les étiquettes depuis Excel ou CSV',
Expand Down
12 changes: 12 additions & 0 deletions core/i18n/resources/mn/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,18 @@ $t(common.appNameFull)
basic: 'Үндсэн',
advanced: 'Нарийвчилсан',
mobileApp: 'Мобайл апп',
print: 'Хэвлэх',
printProps: {
printOrientation: {
label: 'Хуудасны чиглэл',
info: 'Энэ объект өөрийн хэвлэх хэсгийг эхлүүлэхэд ашиглагдах чиглэл. Анхдагчаар экспортод сонгосон баримтын чиглэлийг дагана.',
},
orientations: {
default: 'Анхдагч (баримт)',
portrait: 'Босоо',
landscape: 'Хэвтээ',
},
},
validations: 'Баталгаажуулалтууд',
function: 'Функц',
editingFunction: 'Функц {{functionName}}-г засах',
Expand Down
23 changes: 23 additions & 0 deletions core/i18n/resources/mn/surveyForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,29 @@ Arena Mobile дээр:
confirmNodeDelete: 'Та энэ {{nodeDefType}} ({{nodeDefLabel}})-г устгахыг хүсч байгаадаа итгэлтэй байна уу?',
downloadPrintableDocument: 'Хэвлэх баримт бичиг татах (Word)',
downloadPrintableDocumentPdf: 'Хэвлэх баримт бичиг татах (PDF)',
printableExport: {
title: 'Export printable document',
exportDocument: 'Export Document',
format: 'Format',
formats: {
pdf: 'PDF',
docx: 'Word',
},
scope: 'Content',
scopes: {
full: 'Full survey',
currentPage: 'Current page only',
},
currentPageHint: 'Current page: {{entityLabel}}',
currentPageUnavailable:
'Unable to determine the current page instance. Navigate to a specific page or export the full survey.',
orientation: 'Page orientation',
orientations: {
portrait: 'Portrait',
landscape: 'Landscape',
},
download: 'Download',
},
exportLabels_csv: 'Шошгыг экспортлох (CSV)',
exportLabels_xlsx: 'Шошгыг экспортлох (Excel)',
importLabels: 'Шошгыг Excel эсвэл CSV-ээс импортлох',
Expand Down
12 changes: 12 additions & 0 deletions core/i18n/resources/pt/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,18 @@ $t(common.appNameFull)
basic: 'Básico',
advanced: 'Avançado',
mobileApp: 'Aplicativo móvel',
print: 'Impressão',
printProps: {
printOrientation: {
label: 'Orientação da página',
info: 'Orientação usada quando esta entidade inicia sua própria seção imprimível. Por padrão, herda a orientação do documento escolhida na exportação.',
},
orientations: {
default: 'Padrão (documento)',
portrait: 'Retrato',
landscape: 'Paisagem',
},
},
validations: 'Validações',
function: 'Função',
editingFunction: 'Editando função {{functionName}}',
Expand Down
23 changes: 23 additions & 0 deletions core/i18n/resources/pt/surveyForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,29 @@ No Arena Mobile:
confirmNodeDelete: 'Tem certeza de que deseja excluir este(a) {{nodeDefType}} ({{nodeDefLabel}})?',
downloadPrintableDocument: 'Baixar documento imprimível (Word)',
downloadPrintableDocumentPdf: 'Baixar documento imprimível (PDF)',
printableExport: {
title: 'Exportar documento imprimível',
exportDocument: 'Exportar documento',
format: 'Formato',
formats: {
pdf: 'PDF',
docx: 'Word',
},
scope: 'Conteúdo',
scopes: {
full: 'Pesquisa completa',
currentPage: 'Somente página atual',
},
currentPageHint: 'Página atual: {{entityLabel}}',
currentPageUnavailable:
'Não foi possível determinar a instância da página atual. Navegue até uma página específica ou exporte a pesquisa completa.',
orientation: 'Orientação da página',
orientations: {
portrait: 'Retrato',
landscape: 'Paisagem',
},
download: 'Baixar',
},
exportLabels_csv: 'Exportar rótulos (CSV)',
exportLabels_xlsx: 'Exportar rótulos (Excel)',
importLabels: 'Importar rótulos de Excel ou CSV',
Expand Down
12 changes: 12 additions & 0 deletions core/i18n/resources/ru/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,18 @@ $t(common.appNameFull)
basic: 'Основное',
advanced: 'Расширенные',
mobileApp: 'Мобильное приложение',
print: 'Печать',
printProps: {
printOrientation: {
label: 'Ориентация страницы',
info: 'Ориентация, используемая когда эта сущность начинает свою собственную печатную секцию. По умолчанию наследуется ориентация документа, выбранная при экспорте.',
},
orientations: {
default: 'По умолчанию (документ)',
portrait: 'Портретная',
landscape: 'Альбомная',
},
},
validations: 'Проверки',
function: 'Функция',
editingFunction: 'Редактирование функции {{functionName}}',
Expand Down
23 changes: 23 additions & 0 deletions core/i18n/resources/ru/surveyForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,29 @@ export default {
confirmNodeDelete: 'Вы уверены, что хотите удалить этот {{nodeDefType}} ({{nodeDefLabel}})?',
downloadPrintableDocument: 'Скачать печатный документ (Word)',
downloadPrintableDocumentPdf: 'Скачать печатный документ (PDF)',
printableExport: {
title: 'Экспорт печатного документа',
exportDocument: 'Экспорт документа',
format: 'Формат',
formats: {
pdf: 'PDF',
docx: 'Word',
},
scope: 'Содержимое',
scopes: {
full: 'Вся анкета',
currentPage: 'Только текущая страница',
},
currentPageHint: 'Текущая страница: {{entityLabel}}',
currentPageUnavailable:
'Не удалось определить экземпляр текущей страницы. Перейдите на конкретную страницу или экспортируйте всю анкету.',
orientation: 'Ориентация страницы',
orientations: {
portrait: 'Книжная',
landscape: 'Альбомная',
},
download: 'Скачать',
},
exportLabels_csv: 'Экспорт меток (CSV)',
exportLabels_xlsx: 'Экспорт меток (Excel)',
importLabels: 'Импорт меток из Excel или CSV',
Expand Down
10 changes: 10 additions & 0 deletions core/survey/nodeDef.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ export const propKeys = {

// layout elements
headerColor: 'headerColor',

// print
printOrientation: 'printOrientation',
}

const commonAttributePropsKeys = [
Expand Down Expand Up @@ -326,6 +329,13 @@ export const getTextTransformFunction = (nodeDef) =>
export const getHeaderColor = getProp(propKeys.headerColor)
export const isLayoutElement = isFormHeader

/**
* Returns the entity printable orientation, if set.
* @param {!object} nodeDef - Entity node definition.
* @returns {string|undefined} 'portrait' | 'landscape' | undefined.
*/
export const getPrintOrientation = getProp(propKeys.printOrientation)

// ==== READ meta
export const getMeta = R.propOr({}, keys.meta)
export const getMetaHierarchy = R.pathOr([], [keys.meta, metaKeys.h])
Expand Down
Loading
Loading