1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2025-02-17 21:06:48 +01:00

Add French transliteration

This commit is contained in:
Cédric Bellegarde 2022-08-13 19:21:20 +01:00 committed by Gitea
parent 6e678a8123
commit 01a3639199
3 changed files with 36 additions and 0 deletions

View File

@ -42,6 +42,7 @@ import nodomain.freeyourgadget.gadgetbridge.util.language.impl.CzechTransliterat
import nodomain.freeyourgadget.gadgetbridge.util.language.impl.EstonianTransliterator;
import nodomain.freeyourgadget.gadgetbridge.util.language.impl.ExtendedAsciiTransliterator;
import nodomain.freeyourgadget.gadgetbridge.util.language.impl.FlattenToAsciiTransliterator;
import nodomain.freeyourgadget.gadgetbridge.util.language.impl.FrenchTransliterator;
import nodomain.freeyourgadget.gadgetbridge.util.language.impl.GermanTransliterator;
import nodomain.freeyourgadget.gadgetbridge.util.language.impl.GreekTransliterator;
import nodomain.freeyourgadget.gadgetbridge.util.language.impl.HebrewTransliterator;
@ -64,6 +65,7 @@ public class LanguageUtils {
put("czech", new CzechTransliterator());
put("estonian", new EstonianTransliterator());
put("extended_ascii", new ExtendedAsciiTransliterator());
put("french", new FrenchTransliterator());
put("german", new GermanTransliterator());
put("greek", new GreekTransliterator());
put("hebrew", new HebrewTransliterator());

View File

@ -0,0 +1,32 @@
/* Copyright (C) 2022 Cédric Bellegarde, José Rebelo
This file is part of Gadgetbridge.
Gadgetbridge is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gadgetbridge 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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
package nodomain.freeyourgadget.gadgetbridge.util.language.impl;
import java.util.HashMap;
import nodomain.freeyourgadget.gadgetbridge.util.language.SimpleTransliterator;
public class FrenchTransliterator extends SimpleTransliterator {
public FrenchTransliterator() {
super(new HashMap<Character, String>() {{
put('à',"a"); put('â',"a");
put('é',"e"); put('è',"e"); put('ê',"e"); put('ë',"e");
put('ù',"u"); put('ü',"u");
put('ÿ', "y"); put('ç',"c");
}});
}
}

View File

@ -2320,6 +2320,7 @@
<item>@string/czech</item>
<item>@string/estonian</item>
<item>@string/extended_ascii</item>
<item>@string/french</item>
<item>@string/german</item>
<item>@string/greek</item>
<item>@string/hebrew</item>
@ -2340,6 +2341,7 @@
<item>czech</item>
<item>estonian</item>
<item>extended_ascii</item>
<item>french</item>
<item>german</item>
<item>greek</item>
<item>hebrew</item>