fix(glossaries): restore selectable source language (data was already there)
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m37s
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m37s
Revert du commit e11a6b1 : la langue source doit etre selectionnable
(car l'utilisateur peut vouloir traduire depuis n'importe quelle
des 12 langues supportees, pas seulement le francais).
Le data modele support deja le cas : chaque terme a un champ
\ ranslations\ (dict de 11 langues) qui contient la traduction du
terme source. Donc pour traduire depuis l'italien, on lit
\ erm.translations.it\ comme source, et \ erm.translations.es\
comme cible si la cible est l'espagnol.
Changements :
- Le combobox 'Langue source' est restaure (12 langues)
- Nouvelle fonction \getDisplaySource(term, lang)\ :
* 'fr' ou 'multi' → term.source (le francais original)
* autre → term.translations[lang] (la traduction dans la langue)
* fallback → term.source si la traduction manque
- handleTermChange ecrit au bon endroit selon la langue :
* source FR → term.source
* autre source → term.translations[sourceLanguage]
* target 'multi'/'en' → term.target
* autre target → term.translations[targetLanguage]
- hasUnsavedChanges compare aussi le dict translations (avant
il ne comparait que source|target, donc un edit dans une autre
langue ne declenchait pas l'alerte 'non enregistre')
- Note sous le combobox source explique la regle
(FR = source originale, autre = champ translations)
- i18n : nouvelle cle \glossaries.detail.sourceLangNote\
ajoutee aux 13 locales (FR + EN traduit)
L'utilisateur peut maintenant choisir 'Italien' comme source et
'Espagnol' comme cible, et voir les termes correspondants.
This commit is contained in:
@@ -438,6 +438,7 @@ const messages: Record<Locale, Record<string, string>> = {
|
||||
"glossaries.detail.confirmDelete": "Confirm deletion?",
|
||||
"glossaries.detail.confirm": "Confirm",
|
||||
"glossaries.detail.cancel": "Cancel",
|
||||
"glossaries.detail.sourceLangNote": "'The original source is in French. For other languages, we read the term's translations field (if available).'",
|
||||
"glossaries.detail.sourceLocked": "fixed",
|
||||
"glossaries.detail.sourceLockedNote": "Templates only store the source in French. Multilingual source is on the roadmap.",
|
||||
"glossaries.detail.targetLangNote": "Pick a language to see the matching translations, or « Multilingual » for the default value.",
|
||||
@@ -1425,6 +1426,7 @@ const messages: Record<Locale, Record<string, string>> = {
|
||||
"glossaries.detail.confirmDelete": "Confirmer la suppression ?",
|
||||
"glossaries.detail.confirm": "Confirmer",
|
||||
"glossaries.detail.cancel": "Annuler",
|
||||
"glossaries.detail.sourceLangNote": "'La source originale est en francais. Pour les autres langues, on lit le champ translations du terme (si disponible).'",
|
||||
"glossaries.detail.sourceLocked": "fixé",
|
||||
"glossaries.detail.sourceLockedNote": "Les templates ne stockent la source qu'en français. Le multilingue source est sur la roadmap.",
|
||||
"glossaries.detail.targetLangNote": "Choisissez une langue pour voir les traductions correspondantes, ou « Multilingue » pour la valeur par défaut.",
|
||||
@@ -2398,6 +2400,7 @@ const messages: Record<Locale, Record<string, string>> = {
|
||||
"glossaries.detail.confirmDelete": "Confirm deletion?",
|
||||
"glossaries.detail.confirm": "Confirm",
|
||||
"glossaries.detail.cancel": "Cancel",
|
||||
"glossaries.detail.sourceLangNote": "'The original source is in French. For other languages, we read the term's translations field (if available).'",
|
||||
"glossaries.detail.sourceLocked": "fixed",
|
||||
"glossaries.detail.sourceLockedNote": "Templates only store the source in French. Multilingual source is on the roadmap.",
|
||||
"glossaries.detail.targetLangNote": "Pick a language to see the matching translations, or « Multilingual » for the default value.",
|
||||
@@ -3326,6 +3329,7 @@ const messages: Record<Locale, Record<string, string>> = {
|
||||
"glossaries.detail.confirmDelete": "Confirm deletion?",
|
||||
"glossaries.detail.confirm": "Confirm",
|
||||
"glossaries.detail.cancel": "Cancel",
|
||||
"glossaries.detail.sourceLangNote": "'The original source is in French. For other languages, we read the term's translations field (if available).'",
|
||||
"glossaries.detail.sourceLocked": "fixed",
|
||||
"glossaries.detail.sourceLockedNote": "Templates only store the source in French. Multilingual source is on the roadmap.",
|
||||
"glossaries.detail.targetLangNote": "Pick a language to see the matching translations, or « Multilingual » for the default value.",
|
||||
@@ -4254,6 +4258,7 @@ const messages: Record<Locale, Record<string, string>> = {
|
||||
"glossaries.detail.confirmDelete": "Confirm deletion?",
|
||||
"glossaries.detail.confirm": "Confirm",
|
||||
"glossaries.detail.cancel": "Cancel",
|
||||
"glossaries.detail.sourceLangNote": "'The original source is in French. For other languages, we read the term's translations field (if available).'",
|
||||
"glossaries.detail.sourceLocked": "fixed",
|
||||
"glossaries.detail.sourceLockedNote": "Templates only store the source in French. Multilingual source is on the roadmap.",
|
||||
"glossaries.detail.targetLangNote": "Pick a language to see the matching translations, or « Multilingual » for the default value.",
|
||||
@@ -5182,6 +5187,7 @@ const messages: Record<Locale, Record<string, string>> = {
|
||||
"glossaries.detail.confirmDelete": "Confirm deletion?",
|
||||
"glossaries.detail.confirm": "Confirm",
|
||||
"glossaries.detail.cancel": "Cancel",
|
||||
"glossaries.detail.sourceLangNote": "'The original source is in French. For other languages, we read the term's translations field (if available).'",
|
||||
"glossaries.detail.sourceLocked": "fixed",
|
||||
"glossaries.detail.sourceLockedNote": "Templates only store the source in French. Multilingual source is on the roadmap.",
|
||||
"glossaries.detail.targetLangNote": "Pick a language to see the matching translations, or « Multilingual » for the default value.",
|
||||
@@ -6110,6 +6116,7 @@ const messages: Record<Locale, Record<string, string>> = {
|
||||
"glossaries.detail.confirmDelete": "Confirm deletion?",
|
||||
"glossaries.detail.confirm": "Confirm",
|
||||
"glossaries.detail.cancel": "Cancel",
|
||||
"glossaries.detail.sourceLangNote": "'The original source is in French. For other languages, we read the term's translations field (if available).'",
|
||||
"glossaries.detail.sourceLocked": "fixed",
|
||||
"glossaries.detail.sourceLockedNote": "Templates only store the source in French. Multilingual source is on the roadmap.",
|
||||
"glossaries.detail.targetLangNote": "Pick a language to see the matching translations, or « Multilingual » for the default value.",
|
||||
@@ -7038,6 +7045,7 @@ const messages: Record<Locale, Record<string, string>> = {
|
||||
"glossaries.detail.confirmDelete": "Confirm deletion?",
|
||||
"glossaries.detail.confirm": "Confirm",
|
||||
"glossaries.detail.cancel": "Cancel",
|
||||
"glossaries.detail.sourceLangNote": "'The original source is in French. For other languages, we read the term's translations field (if available).'",
|
||||
"glossaries.detail.sourceLocked": "fixed",
|
||||
"glossaries.detail.sourceLockedNote": "Templates only store the source in French. Multilingual source is on the roadmap.",
|
||||
"glossaries.detail.targetLangNote": "Pick a language to see the matching translations, or « Multilingual » for the default value.",
|
||||
@@ -7968,6 +7976,7 @@ const messages: Record<Locale, Record<string, string>> = {
|
||||
"glossaries.detail.confirmDelete": "Confirm deletion?",
|
||||
"glossaries.detail.confirm": "Confirm",
|
||||
"glossaries.detail.cancel": "Cancel",
|
||||
"glossaries.detail.sourceLangNote": "'The original source is in French. For other languages, we read the term's translations field (if available).'",
|
||||
"glossaries.detail.sourceLocked": "fixed",
|
||||
"glossaries.detail.sourceLockedNote": "Templates only store the source in French. Multilingual source is on the roadmap.",
|
||||
"glossaries.detail.targetLangNote": "Pick a language to see the matching translations, or « Multilingual » for the default value.",
|
||||
@@ -8895,6 +8904,7 @@ const messages: Record<Locale, Record<string, string>> = {
|
||||
"glossaries.detail.confirmDelete": "Confirm deletion?",
|
||||
"glossaries.detail.confirm": "Confirm",
|
||||
"glossaries.detail.cancel": "Cancel",
|
||||
"glossaries.detail.sourceLangNote": "'The original source is in French. For other languages, we read the term's translations field (if available).'",
|
||||
"glossaries.detail.sourceLocked": "fixed",
|
||||
"glossaries.detail.sourceLockedNote": "Templates only store the source in French. Multilingual source is on the roadmap.",
|
||||
"glossaries.detail.targetLangNote": "Pick a language to see the matching translations, or « Multilingual » for the default value.",
|
||||
@@ -9822,6 +9832,7 @@ const messages: Record<Locale, Record<string, string>> = {
|
||||
"glossaries.detail.confirmDelete": "Confirm deletion?",
|
||||
"glossaries.detail.confirm": "Confirm",
|
||||
"glossaries.detail.cancel": "Cancel",
|
||||
"glossaries.detail.sourceLangNote": "'The original source is in French. For other languages, we read the term's translations field (if available).'",
|
||||
"glossaries.detail.sourceLocked": "fixed",
|
||||
"glossaries.detail.sourceLockedNote": "Templates only store the source in French. Multilingual source is on the roadmap.",
|
||||
"glossaries.detail.targetLangNote": "Pick a language to see the matching translations, or « Multilingual » for the default value.",
|
||||
@@ -10707,6 +10718,7 @@ const messages: Record<Locale, Record<string, string>> = {
|
||||
"glossaries.detail.confirmDelete": "Confirm deletion?",
|
||||
"glossaries.detail.confirm": "Confirm",
|
||||
"glossaries.detail.cancel": "Cancel",
|
||||
"glossaries.detail.sourceLangNote": "'The original source is in French. For other languages, we read the term's translations field (if available).'",
|
||||
"glossaries.detail.sourceLocked": "fixed",
|
||||
"glossaries.detail.sourceLockedNote": "Templates only store the source in French. Multilingual source is on the roadmap.",
|
||||
"glossaries.detail.targetLangNote": "Pick a language to see the matching translations, or « Multilingual » for the default value.",
|
||||
@@ -11601,6 +11613,7 @@ const messages: Record<Locale, Record<string, string>> = {
|
||||
"glossaries.detail.confirmDelete": "Confirm deletion?",
|
||||
"glossaries.detail.confirm": "Confirm",
|
||||
"glossaries.detail.cancel": "Cancel",
|
||||
"glossaries.detail.sourceLangNote": "'The original source is in French. For other languages, we read the term's translations field (if available).'",
|
||||
"glossaries.detail.sourceLocked": "fixed",
|
||||
"glossaries.detail.sourceLockedNote": "Templates only store the source in French. Multilingual source is on the roadmap.",
|
||||
"glossaries.detail.targetLangNote": "Pick a language to see the matching translations, or « Multilingual » for the default value.",
|
||||
|
||||
Reference in New Issue
Block a user