Skip to content

Commit

Permalink
Ajout du message de prévention sur les fichiers qml
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrousseau1 committed Dec 2, 2024
1 parent b348118 commit 82b31c5
Show file tree
Hide file tree
Showing 3 changed files with 17,795 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ const UploadLayerStyles: FC<UploadLayerStylesProps> = ({ form, format, layers })
return (
<>
<p>{t("add_file", { format: format })}</p>
{format === "qml" && (
<div className="fr-alert fr-alert--warning">
<p>{t("qml_message")}</p>
</div>
)}
<br />
{Object.keys(layers).map((uid) => {
return (
<div key={uid} className={fr.cx("fr-grid-row", "fr-mb-3w")}>
Expand Down
3 changes: 3 additions & 0 deletions assets/i18n/Style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const { i18n } = declareComponentKeys<
| { K: "add_file"; P: { format: string }; R: string }
| { K: "select_file"; P: { format: string }; R: string }
| { K: "remove_style"; P: { styleName: string | undefined }; R: string }
| "qml_message"
>()("Style");

export const StyleFrTranslations: Translations<"fr">["Style"] = {
Expand All @@ -15,6 +16,7 @@ export const StyleFrTranslations: Translations<"fr">["Style"] = {
select_file: ({ format }) => `Sélectionner un fichier au format ${format}`,
remove_style: ({ styleName }) =>
styleName !== undefined ? `Êtes-vous sûr de vouloir supprimer le style ${styleName} ?` : "Êtes-vous sûr de vouloir supprimer ce style ?",
qml_message: "Les fichiers qml générés avec une version de QGIS > 3.28 ne sont pas encore compatibles",
};

export const StyleEnTranslations: Translations<"en">["Style"] = {
Expand All @@ -24,4 +26,5 @@ export const StyleEnTranslations: Translations<"en">["Style"] = {
select_file: ({ format }) => `Select file in format ${format}`,
remove_style: ({ styleName }) =>
styleName !== undefined ? `Are you sure you want to remove the style ${styleName}` : "Are you sure you want to remove this style",
qml_message: "qml files generated with QGIS version > 3.28 are not yet compatible",
};
Loading

0 comments on commit 82b31c5

Please sign in to comment.