Skip to content

Commit

Permalink
Merge pull request #15 from Hugolify/feature/more-meaningful-labels
Browse files Browse the repository at this point in the history
Amélioration des labels & descriptions
  • Loading branch information
sebousan committed Feb 25, 2024
2 parents c72dbc2 + 4beffa3 commit 6656f33
Show file tree
Hide file tree
Showing 17 changed files with 117 additions and 75 deletions.
4 changes: 2 additions & 2 deletions admin/app/content/casestudies.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { isNotIndex } from '../fields/is-not-index.js';
import { draft } from '../fields/draft.js';
import { date } from '../fields/date.js';
import { description } from '../fields/description.js';
import { description } from '../fields/page-description.js';
import { featured_image } from '../fields/featured-image.js';
import { title } from '../fields/title-required.js';
import { title } from '../fields/page-title.js';
import { hero } from '../fields/hero.js';
import { blocks } from '../blocks/blocks.js';
import { t } from '../i18n/translater.js';
Expand Down
8 changes: 4 additions & 4 deletions admin/app/content/expertises.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { isNotIndex } from '../fields/is-not-index.js';
import { draft } from '../fields/draft.js';
import { title } from '../fields/title-required.js';
import { description } from '../fields/description.js';
import { body } from '../fields/body.js';
import { draft } from '../fields/draft.js';
import { featured_image } from '../fields/featured-image.js';
import { isNotIndex } from '../fields/is-not-index.js';
import { description } from '../fields/page-description.js';
import { title } from '../fields/page-title.js';
import { t } from '../i18n/translater.js';

const expertises = {
Expand Down
8 changes: 4 additions & 4 deletions admin/app/content/indexes.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { isIndex } from '../fields/is-index.js';
import { title } from '../fields/title-required.js';
import { description } from '../fields/description.js';
import { hero } from '../fields/hero.js';
import { blocks } from '../blocks/blocks.js';
import { hero } from '../fields/hero.js';
import { isIndex } from '../fields/is-index.js';
import { description } from '../fields/page-description.js';
import { title } from '../fields/page-title.js';
import { t } from '../i18n/translater.js';

const indexes = {
Expand Down
12 changes: 6 additions & 6 deletions admin/app/content/pages.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { isPage } from '../fields/is-page.js';
import { blocks } from '../blocks/blocks.js';
import { body } from '../fields/body.js';
import { draft } from '../fields/draft.js';
import { title } from '../fields/title-required.js';
import { hero } from '../fields/hero.js';
import { featured_image } from '../fields/featured-image.js';
import { description } from '../fields/description.js';
import { body } from '../fields/body.js';
import { blocks } from '../blocks/blocks.js';
import { hero } from '../fields/hero.js';
import { isPage } from '../fields/is-page.js';
import { description } from '../fields/page-description.js';
import { title } from '../fields/page-title.js';
import { t } from '../i18n/translater.js';

const pages = {
Expand Down
4 changes: 2 additions & 2 deletions admin/app/content/persons.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { isNotIndex } from '../fields/is-not-index.js';
import { draft } from '../fields/draft.js';
import { title } from '../fields/title-required.js';
import { description } from '../fields/description.js';
import { title } from '../fields/page-title.js';
import { description } from '../fields/page-description.js';
import { featured_image } from '../fields/featured-image.js';
import { contact } from '../fields/contact.js';
import { body } from '../fields/body.js';
Expand Down
14 changes: 7 additions & 7 deletions admin/app/content/places.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { isNotIndex } from '../fields/is-not-index.js';
import { draft } from '../fields/draft.js';
import { title } from '../fields/title-required.js';
import { description } from '../fields/description.js';
import { featured_image } from '../fields/featured-image.js';
import { blocks } from '../blocks/blocks.js';
import { address } from '../fields/address.js';
import { contact } from '../fields/contact.js';
import { body } from '../fields/body.js';
import { blocks } from '../blocks/blocks.js';
import { contact } from '../fields/contact.js';
import { draft } from '../fields/draft.js';
import { featured_image } from '../fields/featured-image.js';
import { isNotIndex } from '../fields/is-not-index.js';
import { description } from '../fields/page-description.js';
import { title } from '../fields/page-title.js';
import { t } from '../i18n/translater.js';

const places = {
Expand Down
14 changes: 7 additions & 7 deletions admin/app/content/posts.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { isNotIndex } from '../fields/is-not-index.js';
import { draft } from '../fields/draft.js';
import { date } from '../fields/date.js';
import { title } from '../fields/title-required.js';
import { description } from '../fields/description.js';
import { featured_image } from '../fields/featured-image.js';
import { authors } from '../fields/authors.js';
import { body } from '../fields/body.js';
import { categories } from '../fields/categories.js';
import { date } from '../fields/date.js';
import { draft } from '../fields/draft.js';
import { featured_image } from '../fields/featured-image.js';
import { isNotIndex } from '../fields/is-not-index.js';
import { description } from '../fields/page-description.js';
import { title } from '../fields/page-title.js';
import { tags } from '../fields/tags.js';
import { authors } from '../fields/authors.js';
import { t } from '../i18n/translater.js';

const posts = {
Expand Down
14 changes: 7 additions & 7 deletions admin/app/content/products.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { isNotIndex } from '../fields/is-not-index.js';
import { body } from '../fields/body.js';
import { date } from '../fields/date.js';
import { draft } from '../fields/draft.js';
import { title } from '../fields/title-required.js';
import { description } from '../fields/description.js';
import { featured_image } from '../fields/featured-image.js';
import { images } from '../fields/images.js';
import { isNotIndex } from '../fields/is-not-index.js';
import { offer } from '../fields/offer.js';
import { description } from '../fields/page-description.js';
import { title } from '../fields/page-title.js';
import { products_categories } from '../fields/products_categories.js';
import { products_tags } from '../fields/products_tags.js';
import { date } from '../fields/date.js';
import { featured_image } from '../fields/featured-image.js';
import { body } from '../fields/body.js';
import { images } from '../fields/images.js';
import { t } from '../i18n/translater.js';

const products = {
Expand Down
16 changes: 8 additions & 8 deletions admin/app/content/projects.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { isNotIndex } from '../fields/is-not-index.js';
import { draft } from '../fields/draft.js';
import { title } from '../fields/title-required.js';
import { description } from '../fields/description.js';
import { body } from '../fields/body.js';
import { datas } from '../fields/datas.js';
import { date } from '../fields/date.js';
import { projects_types } from '../fields/projects_types.js';
import { projects_tags } from '../fields/projects_tags.js';
import { draft } from '../fields/draft.js';
import { featured_image } from '../fields/featured-image.js';
import { datas } from '../fields/datas.js';
import { body } from '../fields/body.js';
import { images } from '../fields/images.js';
import { isNotIndex } from '../fields/is-not-index.js';
import { description } from '../fields/page-description.js';
import { title } from '../fields/page-title.js';
import { projects_tags } from '../fields/projects_tags.js';
import { projects_types } from '../fields/projects_types.js';
import { t } from '../i18n/translater.js';

const projects = {
Expand Down
14 changes: 7 additions & 7 deletions admin/app/content/publications.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { isNotIndex } from '../fields/is-not-index.js';
import { draft } from '../fields/draft.js';
import { body } from '../fields/body.js';
import { date } from '../fields/date.js';
import { title } from '../fields/title-required.js';
import { description } from '../fields/description.js';
import { press } from '../fields/press.js';
import { publications_persons } from '../fields/publications_persons.js';
import { draft } from '../fields/draft.js';
import { featured_image } from '../fields/featured-image.js';
import { images } from '../fields/images.js';
import { body } from '../fields/body.js';
import { isNotIndex } from '../fields/is-not-index.js';
import { description } from '../fields/page-description.js';
import { title } from '../fields/page-title.js';
import { press } from '../fields/press.js';
import { publications_persons } from '../fields/publications_persons.js';
import { t } from '../i18n/translater.js';

const publications = {
Expand Down
25 changes: 12 additions & 13 deletions admin/app/content/realestates.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
import { isNotIndex } from '../fields/is-not-index.js';
import { draft } from '../fields/draft.js';
import { date } from '../fields/date.js';
import { reference } from '../fields/reference.js';
import { title } from '../fields/title-required.js';
import { description } from '../fields/description.js';
import { realestates_persons } from '../fields/realestates_persons.js';
import { realestates_categories } from '../fields/realestates_categories.js';
import { offer } from '../fields/offer.js';
import { informations } from '../fields/realestates-informations.js';
import { address } from '../fields/address.js';
import { keyfeatures } from '../fields/keyfeatures.js';
import { body } from '../fields/body.js';
import { date } from '../fields/date.js';
import { diagnostic } from '../fields/diagnostic.js';
import { documents } from '../fields/documents.js';
import { draft } from '../fields/draft.js';
import { featured_image } from '../fields/featured-image.js';
import { gallery } from '../fields/gallery.js';
import { body } from '../fields/body.js';
import { isNotIndex } from '../fields/is-not-index.js';
import { keyfeatures } from '../fields/keyfeatures.js';
import { offer } from '../fields/offer.js';
import { description } from '../fields/page-description.js';
import { title } from '../fields/page-title.js';
import { informations } from '../fields/realestates-informations.js';
import { realestates_categories } from '../fields/realestates_categories.js';
import { realestates_persons } from '../fields/realestates_persons.js';
import { reference } from '../fields/reference.js';
import { t } from '../i18n/translater.js';

const realestates = {
Expand Down
4 changes: 2 additions & 2 deletions admin/app/content/services.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { body } from '../fields/body.js';
import { description } from '../fields/description.js';
import { draft } from '../fields/draft.js';
import { featured_image } from '../fields/featured-image.js';
import { isNotIndex } from '../fields/is-not-index.js';
import { description } from '../fields/page-description.js';
import { title } from '../fields/page-title.js';
import { services_categories } from '../fields/services_categories.js';
import { services_persons } from '../fields/services_persons.js';
import { title } from '../fields/title-required.js';
import { t } from '../i18n/translater.js';

const services = {
Expand Down
5 changes: 3 additions & 2 deletions admin/app/fields/featured-image.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import { t } from '../i18n/translater.js';

export const featured_image = {
name: 'image',
label: t.fields.featured_image,
label: t.fields.featured_image.label,
hint: t.fields.featured_image.hint,
widget: 'object',
required: false,
i18n: true,
collapsed: false,
collapsed: true,
fields: [image_src, image_alt, credit]
};
10 changes: 10 additions & 0 deletions admin/app/fields/page-description.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { t } from '../i18n/translater.js';

export const description = {
name: 'description',
label: t.fields.page_description.label,
hint: t.fields.page_description.hint,
widget: 'text',
required: false,
i18n: true
};
10 changes: 10 additions & 0 deletions admin/app/fields/page-title.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { t } from '../i18n/translater.js';

export const title = {
name: 'title',
label: t.fields.page_title.label,
hint: t.fields.page_title.hint,
widget: 'string',
required: true,
i18n: true
};
15 changes: 13 additions & 2 deletions admin/app/i18n/en/fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@ export const fields = {
email: 'Email',
embed: 'Embed',
expertises_items: 'Expertises',
featured_image: 'Featured image',
featured_image: {
label: 'Featured image',
hint: 'Displayed in search results, and in SMS/Messages/Social networks preview'
},
figure: 'Image with legend',
files: 'Files',
gallery: 'Image gallery',
Expand All @@ -154,7 +157,7 @@ export const fields = {
half: 'Half size?',
heading: 'Heading',
hero: {
label: 'Hero',
label: 'Top page section',
fields: {
image: {
label: 'Image',
Expand Down Expand Up @@ -258,6 +261,14 @@ export const fields = {
}
},
pages: 'Pages',
page_description: {
label: 'Description',
hint: 'Displayed in search results, and in SMS/Messages/Social networks preview'
},
page_title: {
label: 'Title of the page',
hint: 'Displayed in tabs, search results, and in SMS/Messages/Social networks preview'
},
pdf: {
label: 'PDF',
hint: 'Compress PDF before sending: https://www.adobe.com/fr/acrobat/online/compress-pdf.html'
Expand Down
15 changes: 13 additions & 2 deletions admin/app/i18n/fr/fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@ export const fields = {
email: 'Email',
embed: 'Embed',
expertises_items: 'Expertises',
featured_image: 'Image mise en avant',
featured_image: {
label: 'Image mise en avant',
hint: 'Affichée dans les résultats de recherche et dans la prévisualition SMS/Messages/Réseaux sociaux'
},
figure: 'Image avec légende',
gallery: 'Galerie d’images',
grid: {
Expand All @@ -153,7 +156,7 @@ export const fields = {
half: 'Demi-taille ?',
heading: 'En-tête',
hero: {
label: 'Hero',
label: 'Section de haut de page',
fields: {
image: {
label: 'Image',
Expand Down Expand Up @@ -256,6 +259,14 @@ export const fields = {
center: 'au centre'
}
},
page_description: {
label: 'Description',
hint: 'Affichée dans les résultats de recherche et dans la prévisualisation SMS/Messages/Réseaux sociaux'
},
page_title: {
label: 'Titre de la page',
hint: 'Affiché dans les onglets, dans les résultats de recherche et dans la prévisualition SMS/Messages/Réseaux sociaux'
},
pages: 'Pages',
pdf: {
label: 'PDF',
Expand Down

0 comments on commit 6656f33

Please sign in to comment.