瀏覽代碼

Merge pull request #132 from Fruit-Punch-Samurai/staging

🌐 Add French language translation
Alessadro Parisi 3 年之前
父節點
當前提交
a54ce72192

+ 16 - 15
materialfx/src/main/java/io/github/palexdev/materialfx/i18n/Language.java

@@ -28,23 +28,24 @@ import java.util.Locale;
  * The enumerator also specifies the project's default language, {@link #defaultLanguage()}.
  */
 public enum Language {
-	ENGLISH(Locale.ENGLISH),
-	ITALIANO(Locale.ITALIAN);
+    ENGLISH(Locale.ENGLISH),
+    ITALIANO(Locale.ITALIAN),
+    FRANCAIS(Locale.FRENCH);
 
-	private final Locale locale;
+    private final Locale locale;
 
-	Language(Locale locale) {
-		this.locale = locale;
-	}
+    Language(Locale locale) {
+        this.locale = locale;
+    }
 
-	public Locale getLocale() {
-		return locale;
-	}
+    /**
+     * @return the project's default language, {@link Language#ENGLISH}
+     */
+    public static Language defaultLanguage() {
+        return ENGLISH;
+    }
 
-	/**
-	 * @return the project's default language, {@link Language#ENGLISH}
-	 */
-	public static Language defaultLanguage() {
-		return ENGLISH;
-	}
+    public Locale getLocale() {
+        return locale;
+    }
 }

+ 2 - 2
materialfx/src/main/java/io/github/palexdev/materialfx/utils/StringUtils.java

@@ -184,10 +184,10 @@ public class StringUtils {
 		} else {
 			long minutes = elapsedSeconds / 60;
 			if (minutes < 60) {
-				return minutes + I18N.getOrDefault("stringUtil.minutes");
+				return I18N.getOrDefault("stringUtil.minutes", minutes);
 			} else {
 				long hours = minutes / 60;
-				return hours < 24 ? hours + I18N.getOrDefault("stringUtils.hours") : hours / 24 + I18N.getOrDefault("stringUtils.days");
+				return hours < 24 ? I18N.getOrDefault("stringUtils.hours", hours) : I18N.getOrDefault("stringUtils.days", hours / 24);
 			}
 		}
 	}

+ 59 - 59
materialfx/src/main/resources/io/github/palexdev/materialfx/i18n/mfxlang_en.properties

@@ -21,86 +21,86 @@
 ##################################################
 
 # Combo Box
-comboBox.contextMenu.selectFirst = Select first
-comboBox.contextMenu.selectNext = Select next
-comboBox.contextMenu.selectPrevious = Select previous
-comboBox.contextMenu.selectLast = Select last
-comboBox.contextMenu.clearSelection = Clear selection
+comboBox.contextMenu.selectFirst=Select first
+comboBox.contextMenu.selectNext=Select next
+comboBox.contextMenu.selectPrevious=Select previous
+comboBox.contextMenu.selectLast=Select last
+comboBox.contextMenu.clearSelection=Clear selection
 
 # Filter Combo Box
-filterCombo.search = Search...
+filterCombo.search=Search...
 
 # Filter Pane
-filterPane.headerText = Filters
-filterPane.activeFilters = Active Filters
-filterPane.searchField = Type in your filter value...
-filterPane.addFilter = Add Filter
+filterPane.headerText=Filters
+filterPane.activeFilters=Active Filters
+filterPane.searchField=Type in your filter value...
+filterPane.addFilter=Add Filter
 
 # Notification Center
-notificationCenter.contextMenu.selectAll = Select all
-notificationCenter.contextMenu.selectRead = Select read
-notificationCenter.contextMenu.selectUnread = Select unread
-notificationCenter.contextMenu.clearSelection = Clear selection
-notificationCenter.contextMenu.sortState = Sort by state
-notificationCenter.contextMenu.sortTime = Sort by time
-notificationCenter.contextMenu.reverseSort = Reverse sort
-notificationCenter.contextMenu.filterRead = Filter by read
-notificationCenter.contextMenu.filterUnread = Filter by unread
-notificationCenter.contextMenu.clearFilter = Clear filter
-notificationCenter.contextMenu.clearSort = Clear sort
-notificationCenter.contextMenu.selectionSeparator = Selection
-notificationCenter.contextMenu.sortingSeparator = Sorting
-notificationCenter.contextMenu.filterSeparator = Filtering
-notificationCenter.dnd = Do Not Disturb
-notificationCenter.header = Notifications
+notificationCenter.contextMenu.selectAll=Select all
+notificationCenter.contextMenu.selectRead=Select read
+notificationCenter.contextMenu.selectUnread=Select unread
+notificationCenter.contextMenu.clearSelection=Clear selection
+notificationCenter.contextMenu.sortState=Sort by state
+notificationCenter.contextMenu.sortTime=Sort by time
+notificationCenter.contextMenu.reverseSort=Reverse sort
+notificationCenter.contextMenu.filterRead=Filter by read
+notificationCenter.contextMenu.filterUnread=Filter by unread
+notificationCenter.contextMenu.clearFilter=Clear filter
+notificationCenter.contextMenu.clearSort=Clear sort
+notificationCenter.contextMenu.selectionSeparator=Selection
+notificationCenter.contextMenu.sortingSeparator=Sorting
+notificationCenter.contextMenu.filterSeparator=Filtering
+notificationCenter.dnd=Do Not Disturb
+notificationCenter.header=Notifications
 
 # Stepper
-stepper.next = Next
-stepper.previous = Previous
+stepper.next=Next
+stepper.previous=Previous
 
 # Stepper Toggle
-stepperToggle.invalidFields = Invalid Fields...
+stepperToggle.invalidFields=Invalid Fields...
 
 # Text Fields
-textField.contextMenu.copy = Copy
-textField.contextMenu.cut = Cut
-textField.contextMenu.paste = Paste
-textField.contextMenu.delete = Delete
-textField.contextMenu.selectAll = Select all
-textField.contextMenu.redo = Redo
-textField.contextMenu.undo = Undo
+textField.contextMenu.copy=Copy
+textField.contextMenu.cut=Cut
+textField.contextMenu.paste=Paste
+textField.contextMenu.delete=Delete
+textField.contextMenu.selectAll=Select all
+textField.contextMenu.redo=Redo
+textField.contextMenu.undo=Undo
 
 ##################################################
 # Enums
 ##################################################
-chainMode.alternativeAnd = and
-chainMode.or = or
+chainMode.alternativeAnd=and
+chainMode.or=or
 
 ##################################################
 # Filters
 ##################################################
-filter.is = is
-filter.isNot = is not
-filter.greater = greater than
-filter.greaterEqual = greater or equal to
-filter.lesser = lesser than
-filter.lesserEqual = lesser or equal to
-filter.contains = contains
-filter.containsIgnCase = contains ignore case
-filter.containsAny = contains any
-filter.containsAll = contains all
-filter.endsWith = ends with
-filter.endsWithIgnCase = ends with ignore case
-filter.equals = equals
-filter.equalsIgnCase = equals ignore case
-filter.notEqual = is not equal to
-filter.startsWith = starts with
-filter.startsWithIgnCase = starts with ignore case
+filter.is=is
+filter.isNot=is not
+filter.greater=greater than
+filter.greaterEqual=greater or equal to
+filter.lesser=lesser than
+filter.lesserEqual=lesser or equal to
+filter.contains=contains
+filter.containsIgnCase=contains ignore case
+filter.containsAny=contains any
+filter.containsAll=contains all
+filter.endsWith=ends with
+filter.endsWithIgnCase=ends with ignore case
+filter.equals=equals
+filter.equalsIgnCase=equals ignore case
+filter.notEqual=is not equal to
+filter.startsWith=starts with
+filter.startsWithIgnCase=starts with ignore case
 
 ##################################################
 # Utils
 ##################################################
-stringUtil.now =  Just now
-stringUtil.minutes =  min ago
-stringUtils.hours =  hours ago
-stringUtils.days =  days ago
+stringUtil.now=Just now
+stringUtil.minutes={0} mins ago
+stringUtils.hours={0} hours ago
+stringUtils.days={0} days ago

+ 111 - 0
materialfx/src/main/resources/io/github/palexdev/materialfx/i18n/mfxlang_fr.properties

@@ -0,0 +1,111 @@
+#
+# Copyright (C) 2022 Parisi Alessandro
+# This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+#
+# MaterialFX is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# MaterialFX is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with MaterialFX.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+##################################################
+# Controls
+##################################################
+
+# Combo Box
+comboBox.contextMenu.selectFirst=Premier élément
+comboBox.contextMenu.selectNext=Suivant
+comboBox.contextMenu.selectPrevious=Précédent
+comboBox.contextMenu.selectLast=Dernier élément
+comboBox.contextMenu.clearSelection=Effacer la sélection
+
+# Filter Combo Box
+# Needs attention: is "search" a name or verb? #03/02/2022
+filterCombo.search=Recherche...
+
+# Filter Pane
+filterPane.headerText=Filtres
+filterPane.activeFilters=Filtres actifs
+filterPane.searchField=Valeur du filtre...
+filterPane.addFilter=Ajouter un filtre
+
+# Notification Center
+notificationCenter.contextMenu.selectAll=Tout sélectionner
+notificationCenter.contextMenu.selectRead=Notifications lues
+notificationCenter.contextMenu.selectUnread=Notifications non lues
+notificationCenter.contextMenu.clearSelection=Effacer la sélection
+notificationCenter.contextMenu.sortState=Trier par état
+
+# Needs attention: "heure" or "temps" #03/02/2022
+notificationCenter.contextMenu.sortTime=Trier par heure
+notificationCenter.contextMenu.reverseSort=Tri inversé
+notificationCenter.contextMenu.filterRead=Filtrer par "Notifications lues"
+notificationCenter.contextMenu.filterUnread=Filtrer par "Notifications non lues"
+notificationCenter.contextMenu.clearFilter=Effacer les filtres
+notificationCenter.contextMenu.clearSort=Annuler le tri
+notificationCenter.contextMenu.selectionSeparator=Sélection
+notificationCenter.contextMenu.sortingSeparator=Tri
+# Needs attention: maybe use "Filtration" or "Filtrage" since the original word was "Filtering" (check context before deciding) #03/02/2022
+notificationCenter.contextMenu.filterSeparator=Filtres
+notificationCenter.dnd=Ne pas déranger
+notificationCenter.header=Notifications
+
+# Stepper
+stepper.next=Suivant
+stepper.previous=Précédent
+
+# Stepper Toggle
+stepperToggle.invalidFields=Champs invalides...
+
+# Text Fields
+textField.contextMenu.copy=Copier
+textField.contextMenu.cut=Couper
+textField.contextMenu.paste=Coller
+textField.contextMenu.delete=Supprimer
+textField.contextMenu.selectAll=Tout sélectionner
+textField.contextMenu.redo=Refaire
+textField.contextMenu.undo=Annuler
+
+##################################################
+# Enums
+##################################################
+chainMode.alternativeAnd=et
+chainMode.or=ou
+
+##################################################
+# Filters
+##################################################
+filter.is=est égal à
+filter.isNot=n'égal pas
+filter.greater=plus grand que
+filter.greaterEqual=plus grand ou égal à
+filter.lesser=moins que
+filter.lesserEqual=moins ou égal à
+filter.contains=contient
+filter.containsIgnCase=contient (ignorer la capitalisation)
+### Needs attention: Make shorter and more understandable
+filter.containsAny=contient n'importe quel élément
+filter.containsAll=contient tout
+filter.endsWith=se termine par
+filter.endsWithIgnCase=se termine par (ignorer la capitalisation)
+filter.equals=est égal à
+filter.equalsIgnCase=est égal à (ignore la capitalisation)
+filter.notEqual=n'est pas égal à
+filter.startsWith=commence par
+filter.startsWithIgnCase=commence par (ignore la capitalisation)
+
+##################################################
+# Utils
+##################################################
+stringUtil.now=Maintenant
+stringUtil.minutes={0} minutes
+stringUtils.hours={0} heures
+stringUtils.days={0} jours