diff --git a/lib/configure.py b/lib/configure.py index 1547000b37..9f3c0325ee 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -1876,7 +1876,7 @@ if __name__ == '__main__': lyx_check_config = True lyx_kpsewhich = True outfile = 'lyxrc.defaults' - lyxrc_fileformat = 33 + lyxrc_fileformat = 34 rc_entries = '' lyx_keep_temps = False version_suffix = '' diff --git a/lib/scripts/prefs2prefs_prefs.py b/lib/scripts/prefs2prefs_prefs.py index 322990add5..598c06b794 100644 --- a/lib/scripts/prefs2prefs_prefs.py +++ b/lib/scripts/prefs2prefs_prefs.py @@ -134,6 +134,8 @@ # and \citation_search_view. # No conversion necessary. +# Incremented to format 34, by yuriy +# Rename *.kmap files for Cyrillic languages # NOTE: The format should also be updated in LYXRC.cpp and # in configure.py. @@ -439,6 +441,16 @@ def remove_use_pixmap_cache(line): return no_match return (True, "") +def rename_cyrillic_kmap_files(line): + line = line.lower() + if not (line.startswith("\\kbmap_primary ") + or line.startswith("\\kbmap_secondary ")): + return no_match + line = line.replace('"bg-bds-1251"', '"bulgarian"') + line = line.replace('"koi8-r"', '"russian"') + line = line.replace('"koi8-u"', '"ukrainian"') + return (True, line) + # End conversions for LyX 2.3 to 2.4 #################################### @@ -486,5 +498,6 @@ conversions = [ [ 30, []], [ 31, []], [ 32, []], - [ 33, []] + [ 33, []], + [ 34, [rename_cyrillic_kmap_files]] ] diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp index 323881d564..59bdc70a58 100644 --- a/src/LyXRC.cpp +++ b/src/LyXRC.cpp @@ -65,7 +65,7 @@ namespace { // The format should also be updated in configure.py, and conversion code // should be added to prefs2prefs_prefs.py. -static unsigned int const LYXRC_FILEFORMAT = 33; // sanda: add \citation_search_view +static unsigned int const LYXRC_FILEFORMAT = 34; // yuriy: rename kmap files // when adding something to this array keep it sorted! LexerKeyword lyxrcTags[] = { { "\\accept_compound", LyXRC::RC_ACCEPT_COMPOUND },