Merge pull request #47153 from Ma27/hunspell-fr_FR-dictionary

hunspellDict.fr-any: Link `fr-moderne.dic` to `fr_FR.dic`
This commit is contained in:
worldofpeace 2019-05-23 13:30:05 -04:00 committed by GitHub
commit 713bbb769c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 3 deletions

View File

@ -494,7 +494,7 @@ stdenv.mkDerivation {
<para> <para>
The IBus engine is based on <literal>hunspell</literal> to support The IBus engine is based on <literal>hunspell</literal> to support
completion in many languages. By default the dictionaries completion in many languages. By default the dictionaries
<literal>de-de</literal>, <literal>en-us</literal>, <literal>de-de</literal>, <literal>en-us</literal>, <literal>fr-moderne</literal>
<literal>es-es</literal>, <literal>it-it</literal>, <literal>es-es</literal>, <literal>it-it</literal>,
<literal>sv-se</literal> and <literal>sv-fi</literal> are in use. To add <literal>sv-se</literal> and <literal>sv-fi</literal> are in use. To add
another dictionary, the package can be overridden like this: another dictionary, the package can be overridden like this:

View File

@ -156,6 +156,12 @@
</listitem> </listitem>
</itemizedlist> </itemizedlist>
</listitem> </listitem>
<listitem>
<para>
The <literal>hunspellDicts.fr-any</literal> dictionary now ships with <literal>fr_FR.{aff,dic}</literal>
which is linked to <literal>fr-toutesvariantes.{aff,dic}</literal>.
</para>
</listitem>
</itemizedlist> </itemizedlist>
</section> </section>
</section> </section>

View File

@ -20,6 +20,7 @@ let
# docs # docs
install -dm755 "$out/share/doc" install -dm755 "$out/share/doc"
install -m644 ${readmeFile} $out/share/doc/${name}.txt install -m644 ${readmeFile} $out/share/doc/${name}.txt
runHook postInstall
''; '';
} // args); } // args);
@ -107,7 +108,7 @@ let
}; };
mkDictFromDicollecte = mkDictFromDicollecte =
{ shortName, shortDescription, longDescription, dictFileName }: { shortName, shortDescription, longDescription, dictFileName, isDefault ? false }:
mkDict rec { mkDict rec {
inherit dictFileName; inherit dictFileName;
version = "5.3"; version = "5.3";
@ -131,6 +132,12 @@ let
unpackCmd = '' unpackCmd = ''
unzip $src ${dictFileName}.dic ${dictFileName}.aff ${readmeFile} unzip $src ${dictFileName}.dic ${dictFileName}.aff ${readmeFile}
''; '';
postInstall = stdenv.lib.optionalString isDefault ''
for ext in aff dic; do
ln -sv $out/share/hunspell/${dictFileName}.$ext $out/share/hunspell/fr_FR.$ext
ln -sv $out/share/myspell/dicts/${dictFileName}.$ext $out/share/myspell/dicts/fr_FR.$ext
done
'';
}; };
mkDictFromWordlist = mkDictFromWordlist =
@ -483,6 +490,7 @@ in {
réformées, suivant la lente évolution de lorthographe actuelle. Ce réformées, suivant la lente évolution de lorthographe actuelle. Ce
dictionnaire contient les graphies les moins polémiques de la réforme. dictionnaire contient les graphies les moins polémiques de la réforme.
''; '';
isDefault = true;
}; };
fr-reforme1990 = mkDictFromDicollecte { fr-reforme1990 = mkDictFromDicollecte {

View File

@ -1,5 +1,5 @@
{ typing-booster, symlinkJoin, hunspellDicts, lib, makeWrapper { typing-booster, symlinkJoin, hunspellDicts, lib, makeWrapper
, langs ? [ "de-de" "en-us" "es-es" "it-it" "sv-se" "sv-fi" ] , langs ? [ "de-de" "en-us" "es-es" "fr-moderne" "it-it" "sv-se" "sv-fi" ]
}: }:
let let