From be4aa9b38fedf27a5978505401d74dda406b09c5 Mon Sep 17 00:00:00 2001 From: vdelachaux Date: Tue, 31 Dec 2024 19:25:50 +0100 Subject: [PATCH] language names in fr --- Project/Sources/Classes/_Editor.4dm | 1 + .../Sources/Classes/_WIZARD_Controller.4dm | 6 +- Project/Sources/Classes/language.4dm | 20 ++++- Resources/languages.json | 75 +++++++++++++++++++ 4 files changed, 95 insertions(+), 7 deletions(-) diff --git a/Project/Sources/Classes/_Editor.4dm b/Project/Sources/Classes/_Editor.4dm index 29980a8..cbedfc7 100644 --- a/Project/Sources/Classes/_Editor.4dm +++ b/Project/Sources/Classes/_Editor.4dm @@ -17,6 +17,7 @@ Class constructor This:C1470.LANGS.push(cs:C1710.language.new({\ lproj: $key; \ intl: This:C1470.RESOURCES.intl[$indx]; \ + fr: This:C1470.RESOURCES.fr[$indx]; \ localized: This:C1470.RESOURCES.localized[$indx]; \ iso: This:C1470.RESOURCES["ISO639-1"][$indx]; \ legacy: This:C1470.RESOURCES.legacy[$indx]; \ diff --git a/Project/Sources/Classes/_WIZARD_Controller.4dm b/Project/Sources/Classes/_WIZARD_Controller.4dm index d845be0..e1a3660 100644 --- a/Project/Sources/Classes/_WIZARD_Controller.4dm +++ b/Project/Sources/Classes/_WIZARD_Controller.4dm @@ -114,7 +114,7 @@ Function doSelectSourceLanguage() End if - For each ($language; $c.orderBy("lproj")) + For each ($language; $c.orderBy("localized")) $menu.append($language.menuItem(); $language.lproj)\ .mark($language.lproj=Form:C1466.reference.lproj) @@ -127,7 +127,7 @@ Function doSelectSourceLanguage() $c:=$c.extract("lproj") - For each ($language; This:C1470.Editor.LANGS.orderBy("lproj")) + For each ($language; This:C1470.Editor.LANGS.orderBy("localized")) If ($c.includes($language.lproj)) @@ -156,7 +156,7 @@ Function doAddTargetLanguage() var $c : Collection:=Form:C1466.languages.copy().push(Form:C1466.reference).distinct().extract("lproj") - For each ($language; This:C1470.Editor.LANGS.orderBy("lproj")) + For each ($language; This:C1470.Editor.LANGS.orderBy("localized")) $menu.append($language.menuItem(); $language.lproj) diff --git a/Project/Sources/Classes/language.4dm b/Project/Sources/Classes/language.4dm index a03a0c9..3cd525c 100644 --- a/Project/Sources/Classes/language.4dm +++ b/Project/Sources/Classes/language.4dm @@ -1,4 +1,4 @@ -property lproj; intl; localized; iso; legacy; flag; regional : Text +property lproj; intl; fr; localized; iso; legacy; flag; regional : Text property xliff : cs:C1710.Xliff property root : Text @@ -13,7 +13,7 @@ Class constructor($in : Object) End for each - + // === === === === === === === === === === === === === === === === === === === === === === === === Function menuItem($withoutFlag : Boolean) : Text var $label : Text @@ -28,10 +28,22 @@ Function menuItem($withoutFlag : Boolean) : Text End if - If (This:C1470.localized#This:C1470.intl) + If (Get database localization:C1009(User system localization:K5:23; *)="fr")\ + || (Get database localization:C1009(Current localization:K5:22; *)="fr") + + If (This:C1470.localized#This:C1470.fr) + + $label+=" ("+This:C1470.fr+")" + + End if - $label+=" ("+This:C1470.intl+")" + Else + If (This:C1470.localized#This:C1470.intl) + + $label+=" ("+This:C1470.intl+")" + + End if End if return $label \ No newline at end of file diff --git a/Resources/languages.json b/Resources/languages.json index 2070bfc..b06c082 100755 --- a/Resources/languages.json +++ b/Resources/languages.json @@ -149,6 +149,81 @@ "Ukrainian", "Viêt Namese" ], + "fr": [ + "Afrikaans", + "Albanais", + "Biélorusse", + "Bulgare", + "Croate", + "Tchèque", + "Danois", + "Néerlandais Pays-Bas", + "Néerlandais Belgique", + "Anglais US", + "Anglais UK", + "Anglais Australie", + "Anglais Canada", + "Anglais Nouvelle-Zélande", + "Anglais Irlande", + "Anglais Afrique du Sud", + "Anglais Jamaïque", + "Anglais Belize", + "Anglais Trinidad", + "Estonien", + "Féroïen", + "Finnois", + "Français", + "Français Belgique", + "Français Canada", + "Français Suisse", + "Français Luxembourg", + "Allemand", + "Allemand Suisse", + "Allemand Autriche", + "Allemand Luxembourg", + "Allemand Liechtenstein", + "Grec", + "Hongrois", + "Islandais", + "Italien", + "Italien Suisse", + "Japonais", + "Letton", + "Lituanien", + "Norvégien", + "Polonais", + "Portugais", + "Portugais Brésilien", + "Roumain", + "Russe", + "Serbe", + "Slovaque", + "Slovène", + "Espagnol", + "Espagnol Mexique", + "Espagnol Guatemala", + "Espagnol Costa Rica", + "Espagnol Panama", + "Espagnol République Dominicaine", + "Espagnol Venezuela", + "Espagnol Colombie", + "Espagnol Pérou", + "Espagnol Argentine", + "Espagnol Équateur", + "Espagnol Chili", + "Espagnol Uruguay", + "Espagnol Paraguay", + "Espagnol Bolivie", + "Espagnol Salvadore", + "Espagnol Honduras", + "Espagnol Nicaragua", + "Espagnol Porto Rico", + "Suédois", + "Suédois Finlande", + "Turc", + "Ukrainien", + "Vietnamien" + ], "localized": [ "Afrikaans", "Shqip",