From dadc1bbe711c2f18efef8a133e937cdb154e1c72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20St=C3=B6hr?= Date: Mon, 8 Apr 2013 23:42:18 +0200 Subject: [PATCH] installer: support to spell-check Serbian(Latin) - also update the Serbian(Cyrillic) dictionary --- .../Win32/packaging/installer/ChangeLog.txt | 3 ++- .../installer/HunspellDictionaryNames.txt | 2 ++ .../installer/include/dictionaries.nsh | 6 +++--- .../packaging/installer/include/init.nsh | 20 +++++++++++++++---- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/development/Win32/packaging/installer/ChangeLog.txt b/development/Win32/packaging/installer/ChangeLog.txt index 573076c242..4a0898155d 100644 --- a/development/Win32/packaging/installer/ChangeLog.txt +++ b/development/Win32/packaging/installer/ChangeLog.txt @@ -2,9 +2,10 @@ - support for Vietnamese, Thai, Serbian Cyrillic and Mongolian will now automatically be installed to MiKTeX - language support files for Belarusian and Hungarian are now included +- new spell-checker dictionary for Serbian(Latin) - updated to eLyXer 1.2.5 - updated spell-checker dictionaries for Belarusian, Breton, Italian, Korean, - Latin, Norwegian, Portuguese, Romanian, Slovakian and Swedish + Latin, Norwegian, Portuguese, Romanian, Serbian(Cyrillic), Slovakian and Swedish (To benefit from them you must uninstall an already installed LyX 2.0.x and then use this installer.) - updated thesaurus for Italian, Norwegian (Bokmal), Portuguese, Romanian, diff --git a/development/Win32/packaging/installer/HunspellDictionaryNames.txt b/development/Win32/packaging/installer/HunspellDictionaryNames.txt index 216f803831..ecb95cfe76 100644 --- a/development/Win32/packaging/installer/HunspellDictionaryNames.txt +++ b/development/Win32/packaging/installer/HunspellDictionaryNames.txt @@ -118,6 +118,8 @@ sq_AL.aff sq_AL.dic sr_RS.aff sr_RS.dic +sr_RS-Latin.aff +sr_RS-Latin.dic sv_SE.aff sv_SE.dic ta_IN.aff diff --git a/development/Win32/packaging/installer/include/dictionaries.nsh b/development/Win32/packaging/installer/include/dictionaries.nsh index b533baea27..9ed3838805 100644 --- a/development/Win32/packaging/installer/include/dictionaries.nsh +++ b/development/Win32/packaging/installer/include/dictionaries.nsh @@ -28,8 +28,8 @@ Function FindDictionaries # read out the possible spell-checker filenames from the file FileOpen $R5 "$INSTDIR\Resources\HunspellDictionaryNames.txt" r - ${for} $5 1 66 - # the file has 132 lines, but we only need to check for one of the 2 dictionary files per language + ${for} $5 1 68 + # the file has 136 lines, but we only need to check for one of the 2 dictionary files per language # therefore check only for every second line FileRead $R5 $String # skip the .aff file FileRead $R5 $String # $String is now the .dic filename @@ -66,7 +66,7 @@ Function DownloadHunspellDictionaries # read out the locations from the file FileOpen $R5 "$INSTDIR\Resources\HunspellDictionaryNames.txt" r - ${For} $5 1 132 # the file has 132 lines + ${For} $5 1 136 # the file has 136 lines FileRead $R5 $String # $String is now the dictionary name StrCpy $R3 $String -6 # $R3 is now the dictionary language code diff --git a/development/Win32/packaging/installer/include/init.nsh b/development/Win32/packaging/installer/include/init.nsh index fd5e2ed828..05dc91e398 100644 --- a/development/Win32/packaging/installer/include/init.nsh +++ b/development/Win32/packaging/installer/include/init.nsh @@ -381,9 +381,14 @@ Section /o "Slovensk AddSize 3310 SectionEnd -Section /o "Srpski" SecDSerbian +Section /o "Srpski (Cirilica)" SecDSerbianC StrCpy $DictCodes "sr_RS,$DictCodes" - AddSize 3460 + AddSize 3560 +SectionEnd + +Section /o "Srpski (Latinica)" SecDSerbianL + StrCpy $DictCodes "sr_RS-Latin,$DictCodes" + AddSize 2000 SectionEnd Section /o "Svenska" SecDSwedish @@ -1081,8 +1086,15 @@ Function .onInit Call StrPoint ${if} $Pointer != "-1" IntOp $0 ${SF_SELECTED} | ${SF_RO} - SectionSetFlags ${SecDSerbian} $0 - SectionSetSize ${SecDSerbian} 0 + SectionSetFlags ${SecDSerbianC} $0 + SectionSetSize ${SecDSerbianC} 0 + ${endif} + StrCpy $Search "sr_RS-Latin" + Call StrPoint + ${if} $Pointer != "-1" + IntOp $0 ${SF_SELECTED} | ${SF_RO} + SectionSetFlags ${SecDSerbianL} $0 + SectionSetSize ${SecDSerbianL} 0 ${endif} StrCpy $Search "sv_SE" Call StrPoint