// Texts of the search field and of the results page (F4, F7), in French and // English. Kept in the repository: the Vue translation files // (sites/default/files/lang/*.json) are generated outside of it. The result // messages come from the server (materio_sapi SearchMessage). const TEXTS = { fr: { placeholder: 'Décrivez le matériau recherché', loading: 'Chargement…', end: 'Fin des résultats', helpLabel: 'Aide à la recherche', help: 'Décrivez en quelques mots le matériau, son usage ou l’effet recherché.', examplesIntro: 'Par exemple :', // Checked on 23/11: the first results answer the phrase. examples: [ 'isolant à base de champignon', 'textile qui change de couleur', 'verre qui devient opaque', 'alternative au plastique pour emballage' ], suggestionsLabel: 'Suggestions', suggestionsOne: '1 suggestion, flèches haut et bas pour choisir', suggestionsMany: n => `${n} suggestions, flèches haut et bas pour choisir` }, en: { placeholder: 'Describe the material you are looking for', loading: 'Loading…', end: 'End of results', helpLabel: 'Search help', help: 'Describe in a few words the material, its use or the effect you are looking for.', examplesIntro: 'For example:', examples: [ 'mushroom-based insulation', 'colour-changing textile', 'glass that turns opaque', 'plastic alternative for packaging' ], suggestionsLabel: 'Suggestions', suggestionsOne: '1 suggestion, use up and down arrows to choose', suggestionsMany: n => `${n} suggestions, use up and down arrows to choose` } } // Texts of the page language, English by default. export function searchTexts () { const lang = (window.drupalDecoupled && window.drupalDecoupled.lang_code) || 'en' return TEXTS[lang] || TEXTS.en }