Merge branch 'feat/add-i18n-from-browser' into 'develop'

feat : add browser translation in en

See merge request geovisio/website!98
This commit is contained in:
Jean Andreani
2023-10-25 13:54:17 +00:00
7 changed files with 218 additions and 24 deletions

View File

@@ -5,14 +5,12 @@ import Footer from '@/components/Footer.vue'
import { RouterView } from 'vue-router'
import { useMeta } from 'vue-meta'
import { useI18n } from 'vue-i18n'
import { useRoute } from 'vue-router'
import { useCookies } from 'vue3-cookies'
import { title } from '@/utils/index'
import authConfig from './composables/auth'
const { authConf } = authConfig()
const { t } = useI18n()
const { cookies } = useCookies()
const route = useRoute()
let focusMap = ref<string>('focus-map')

View File

@@ -36,9 +36,9 @@ h5 {
--grey-dark: #3e3e3e;
--blue: #2954e9;
--blue-dark: #0a1f69;
--blue-geovisio: #34495e;
--blue-semi: #d7dffc;
--blue-pale: #f2f5ff;
--blue-geovisio: #34495e;
--beige: #f5f3ec;
--yellow: #fec868;
--orange: #ff6f00;

View File

@@ -89,12 +89,31 @@ ul {
margin-right: toRem(2);
height: toRem(2);
}
@media (max-width: toRem(76.8)) {
.footer {
padding: toRem(1);
height: toRem(6.5);
}
.link-list {
flex-wrap: wrap;
align-items: center;
height: 100%;
}
.logo {
margin-right: toRem(0.5);
height: toRem(1.5);
}
.link-item {
margin-right: toRem(1);
margin-bottom: toRem(1);
}
.link {
height: toRem(1.5);
}
}
@media (max-width: toRem(50)) {
.title {
margin-bottom: 0;
}
.footer {
padding: toRem(2);
}
}
</style>

View File

@@ -80,16 +80,6 @@ function triggerButton() {
opacity: 0.8;
}
}
.icon {
color: var(--black);
font-size: toRem(2.4);
margin-right: toRem(1);
}
.logo {
height: inherit;
border-radius: toRem(0.5);
margin-right: toRem(1);
}
.button {
height: toRem(4);
border-radius: toRem(1);
@@ -105,6 +95,16 @@ function triggerButton() {
opacity: 0.5;
}
}
.icon {
color: var(--black);
font-size: toRem(2.4);
margin-right: toRem(1);
}
.logo {
height: inherit;
border-radius: toRem(0.5);
margin-right: toRem(1);
}
.text {
width: 100%;
white-space: break-spaces;
@@ -200,10 +200,6 @@ function triggerButton() {
}
}
@media (max-width: toRem(50)) {
.default {
min-height: toRem(4);
min-width: toRem(4);
}
.icon {
margin-right: toRem(0.5);
}

179
src/locales/en.json Normal file
View File

@@ -0,0 +1,179 @@
{
"general": {
"title": "Panoramax instance",
"meta": {
"title": "Panoramax instance",
"description": "Panoramax, the free alternative to photo-mapping territories"
},
"header": {
"login_text": "Connect",
"register_text": "Register",
"contribute_text": "Why contribute ?",
"my_account": "My account",
"upload_text": "+ Share pictures",
"sequences_text": "My pictures",
"alt_logo": "Instance logo",
"alt_photos": "Pictures icon",
"alt_information": "User icon",
"alt_settings": "Parameters icon",
"alt_logout": "Logout icon",
"title": "Panoramax",
"beta_text": "Beta version",
"logout_text": "Logout",
"my_information_text": "My details",
"my_settings_text": "My parameters",
"burger_menu_aria_label_open": "Show menu",
"burger_menu_aria_label_closed": "Hide menu"
},
"footer": {
"panoramax_site": "Discover Panoramax",
"information_gitlab": "Show source code",
"gitlab_logo": "Gitlab logo",
"ay11_text": "Accessibility: not compliant"
},
"error_text": "An error occured",
"success_text": "Update done"
},
"pages": {
"home": {
"report_mail": "?subject=⚠️ Report on picture {picId}&body=HEllo, %0D%0A%0D%0A Problem on image (keep type of problem reported) : %0D%0A%0D%0A %0D%0A%0D%0A inappropriate content / lack of blurring on an element to be anonymized or blurred for security reasons / overblurring (too much blurring) %0D%0A%0D%0A Link to affected photo : {link} %0D%0A%0D%0A Details of affected elements (especially for blurring problems - what should be blurred or unblurred?) :",
"report_button_text": "Report this picture"
},
"settings": {
"title": "My tokens",
"setting_tooltip": "Show or hide token"
},
"sequence": {
"sequence_published": "Published",
"sequence_waiting": "Still processing",
"sequence_hidden": "Hidden",
"hide_sequence_tooltip": "Hide this sequences",
"delete_sequence_tooltip": "Permanently delete this sequence",
"hide_photo_tooltip": "Hide selected pictures",
"delete_photo_tooltip": "Permanently delete selected pictures",
"confirm_pictures_dialog": "⚠️ Selected photos will be permanently deleted",
"confirm_sequence_dialog": "⚠️ This sequence will be permanently deleted",
"created": "Uploaded :",
"taken": "Shot on :",
"duration": "Duration :",
"duration_begin": "Start :",
"duration_end": "End :",
"camera": "Camera :",
"button_delete": "Delete",
"button_disable": "Hide",
"button_enable": "Show",
"picture_selected": "{count} picture selected| {count} pictures selected",
"hours": "{count} hour| {count} hours",
"minutes": "{count} minute| {count} minutes",
"seconds": "{count} second| {count} seconds",
"select_text": "Select all",
"unselect_text": "Deselect all",
"select_shift_text": "Select multiple photos with shift",
"waiting_process": "Photo in process",
"broken": "Photo error processing",
"no_image": "No picture in this sequence"
},
"sequences": {
"title": "My sequences",
"sequence_name": "Name",
"sequence_photos": "Photos",
"sequence_date": "Shot on",
"sequence_creation": "Upload",
"sequence_status": "Status",
"sequence_published": "Published",
"sequence_waiting": "Still processing",
"sequence_hidden": "Hidden",
"no_sequences_text": "You have no photos published yet \uD83D\uDE22",
"button_upload": "Upload pictures",
"sequence_deleted": "The sequence has been deleted"
},
"share_pictures": {
"title": "Why contribute to Panoramax?",
"description": "Contributing to Panoramax means participating in the development of a geo-common, a sovereign, free and reusable digital resource. Each geolocalized photo published on Panoramax can be used by anyone for a variety of purposes, for example by a local authority needing to observe the status of its roads, or by a telecoms operator to prepare an intervention.\n\nEach contributor can send his or her image sequences, modify them and consult them, as well as all the views - 360° or not - contributed by the community. The compulsory blurring of faces and license plates is automated on the platform.",
"alt_img_map": "Illustration of a woman looking at a map with her geolocated smartphone",
"card_photo1": "Places visible from the public highway",
"card_photo2": "Photos published in 360° format or not",
"card_photo3": "Easily reusable photos",
"card_photo4": "A quick and easy image contribution",
"card_alt_photo1": "Image of a building",
"card_alt_photo2": "Image showing 360-degree ",
"card_alt_photo3": "Image showing a map with a pointer",
"card_alt_photo4": "Image representing a pointer",
"card_description1": "All photos taken from the public highway are accepted, as long as they are geolocated and viewed from the ground.",
"card_description2": "360° pictures are not mandatory: photos taken with a smartphone are all that's needed. Dates, locations and jpg format are the only prerequisites.",
"card_description3": "All photos easily accessible and reusable without an account: via the website or a standard API (STAC standard).",
"card_description4": "Several tools are available to facilitate contributions, including a command line and a web interface.",
"upload_subtitle": "Simply upload your images online",
"upload_illustration_alt": "Illustration showing online photo uploading",
"upload_description": "Panoramax's web application lets you upload all your field photos in JPEG format at the click of a button. No programming skills are required. For larger numbers, however, we recommend using the command-line tool",
"upload_button": "+ Upload pictures",
"command_line_subtitle": "Command line tool",
"comment_install": "Install the geovisio command-line tool",
"comment_upload": "LanceStart the image upload command on the chosen folder",
"description_terminal": "<a href='https://gitlab.com/geovisio/cli' target='_blank' style='color:black'>The CLI</a> lets you share large volumes of photos. The procedure is simple and requires <a target='_blank' href='https://www.python.org/downloads/' style='color:black'>python (version 3.8 or above)</a>.\n\nThe tool will ask for your login details before importing. Once the pictures have been uploaded, a processing time is required before publication.",
"terminal_install": "pip install geovisio_cli",
"terminal_text": "geovisio upload --api-url {url} <DOSSIER_PHOTOS>",
"button_copy": "Copy",
"information_subtitle": "Here, your photos are accessible to all : ",
"information_text1": "Automatically blurred in compliance with legislation.",
"information_text2": "The uploaded pictures will be published under {word}",
"information_text3": "In its original format and resolution for various reuse.",
"information_about_title": "Need to access pictures ?",
"information_about_description": "An API is available to retrieve all metadata and pictures. <a href='{docLink}' target='_blank' style='color:#0a1f69'>\nFind out more here</a>\nData is also displayed in the form <a href='{docTiles}' target='_blank' style='color:#0a1f69'>of vector tiles</a>",
"doc_subtitle": "Need help contributing to Panoramax?",
"doc_description": "Panoramax documentation is available from us, and you can access tutorials on the geo-commons forum.",
"doc_button": "See the documentation",
"doc_illustration_alt": "Illustration of a character with a sheet of documents"
},
"upload": {
"title": "Contribute to the Panoramax project",
"description": "For large volumes of pictures, the command line tool is more suitable.",
"know_more_button": "Read more",
"input_label": "Drag your pictures here or click on ",
"import_word": "upload",
"import_type": "JPEG format only",
"subtitle_import": "Picture upload",
"text_import": "Upload your jpg files here. Each picture or series of pictures constitutes a \"sequence\". You can then find them in the \"my pictures\" section and choose to hide, show or delete them.",
"subtitle_process": "Upload processing",
"uploading_process": "Upload in progress...",
"sequence_title": "Sequence ",
"import": "Uploads",
"upload_pending": "Upload in progress...",
"images_count_text": "Pictures uploaded",
"no_img_text": "no picture upload so far",
"upload_done": "Sequence upload done",
"sequence_link": "Show this sequence",
"pictures_error": "{count} picture could not be uploaded| {count} pictures could not be uploaded",
"sequence_loading_information": "Once uploaded, the sequence will be processed then published on Panoramax (usually within a couple of minutes).",
"sequence_loaded_information": "The sequences has been uploaded and is under processing. It should be publicly available on Panoramax within a couple of minutes.",
"leave_message": "⚠️ WARNING, the download will be interrupted if you leave the page before the end.",
"error_button": "Show errors",
"modal_error_title": "Pictures in error"
},
"ay11": {
"title": "Déclaration daccessibilité",
"date": "Établie le 18 septembre 2023.",
"introduction": "IGN sengage à rendre son service accessible, conformément à larticle 47 de la loi n° 2005-102 du 11 février 2005.\n Cette déclaration daccessibilité sapplique à Panoramax Instance IGN : https://panoramax.ign.fr",
"subtitle_conformity": "État de conformité",
"conformity_text": "Panoramax Instance IGN est non conforme avec le ",
"conformity_text2": "Le site na encore pas été audité.",
"subtitle_conformity2": "Contenus non accessibles",
"subtitle_increase": "Amélioration et contact",
"increase_text": "Si vous narrivez pas à accéder à un contenu ou à un service, vous pouvez\n contacter le responsable de Panoramax Instance IGN pour être orienté vers une alternative accessible ou obtenir le contenu sous une autre forme.",
"phone": "Téléphone : +33 14 398 84 61",
"email_text": "E-mail :",
"email": "signalement.ign@panoramax.fr",
"address": "Adresse : IGN, Saint-Mandé",
"increase_info": "Nous essayons de répondre dans les 5 jours ouvrés.",
"subtitle_to_do": "Voie de recours",
"to_do_text": "Cette procédure est à utiliser dans le cas suivant : vous avez signalé au responsable du site internet un défaut daccessibilité qui vous\n empêche daccéder à un contenu ou à un des services du portail et vous navez pas obtenu de réponse satisfaisante. \n vous pouvez :",
"write_message": "Écrire un message au",
"defenseur_droits": "Défenseur des droits",
"contact": "Contacter",
"contact_text": "le délégué du Défenseur des droits dans votre région",
"send_letter": "Envoyer un courrier par la poste (gratuit, ne pas mettre de\n timbre):\n Défenseur des droits\n Libre réponse 71120 75342 Paris CEDEX 07",
"end": "Cette déclaration daccessibilité a été créé le\n 18 septembre 2023 grâce au",
"generator_betagouv": "Générateur de Déclaration dAccessibilité de BetaGouv"
}
}
}

View File

@@ -8,6 +8,7 @@ import { globalCookiesConfig } from 'vue3-cookies'
import { createMetaManager } from 'vue-meta'
import { pinia } from './store'
import fr from './locales/fr.json'
import en from './locales/en.json'
import './assets/main.scss'
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-icons/font/bootstrap-icons.css'
@@ -17,13 +18,14 @@ axios.defaults.baseURL = import.meta.env.VITE_API_URL
axios.defaults.withCredentials = true
const i18n = createI18n({
locale: 'fr',
locale: navigator.language.split('-')[0],
fallbackLocale: 'fr',
warnHtmlMessage: false,
globalInjection: true,
legacy: false,
messages: {
fr
fr,
en
}
})
globalCookiesConfig({

View File

@@ -29,11 +29,11 @@ const viewerRef = ref<any>(null)
}
@media (max-width: toRem(76.8)) {
.entry-page {
padding-top: toRem(11);
padding-top: toRem(11.5);
overflow: hidden;
}
.entry-section {
height: calc(100vh - #{toRem(11)});
height: calc(100dvh - #{toRem(18)});
}
}
</style>